diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 378e8df..0cd4a9d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -51,7 +51,7 @@ jobs: golangci-lint: runs-on: ubuntu-latest env: - GOLANGCI_LINT_VERSION: v2.4.0 + GOLANGCI_LINT_VERSION: v2.11.4 steps: - name: Checkout diff --git a/panictoerror/middleware.go b/panictoerror/middleware.go index 512937b..b3eef30 100644 --- a/panictoerror/middleware.go +++ b/panictoerror/middleware.go @@ -34,7 +34,7 @@ type PanicError struct { func (e *PanicError) Error() string { var sb strings.Builder for _, frame := range e.Trace { - sb.WriteString(fmt.Sprintf("%s\n\t%s:%d\n", frame.Function, frame.File, frame.Line)) + fmt.Fprintf(&sb, "%s\n\t%s:%d\n", frame.Function, frame.File, frame.Line) } return fmt.Sprintf("PanicError: %v\n%s", e.Cause, sb.String())