From f610eede8c00229b4d4129acd8f5a1420c603cf4 Mon Sep 17 00:00:00 2001 From: Sourcegraph Bot Date: Mon, 11 May 2020 02:58:30 +0000 Subject: [PATCH] Update fmt.Errorf --- langserver/lint.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/langserver/lint.go b/langserver/lint.go index 211f634f..9a9d9e2b 100644 --- a/langserver/lint.go +++ b/langserver/lint.go @@ -104,13 +104,13 @@ func (l golint) Lint(ctx context.Context, bctx *build.Context, args ...string) ( stdout, err := cmd.StdoutPipe() if err != nil { - return nil, fmt.Errorf("lint command error: %s", err) + return nil, fmt.Errorf("lint command error: %w", err) } defer stdout.Close() err = cmd.Start() if err != nil { - return nil, fmt.Errorf("lint command error: %s", err) + return nil, fmt.Errorf("lint command error: %w", err) } diags := diagnostics{} @@ -142,12 +142,12 @@ func (l golint) Lint(ctx context.Context, bctx *build.Context, args ...string) ( } if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("could not read lint command output: %s", err) + return nil, fmt.Errorf("could not read lint command output: %w", err) } cmd.Wait() if err != nil { - return nil, fmt.Errorf("lint command error: %s", err) + return nil, fmt.Errorf("lint command error: %w", err) } if errBuff.Len() > 0 {