Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Update fmt.Errorf #388

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions langserver/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down Expand Up @@ -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 {
Expand Down