Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix linter findings for errorlint (part1) #12701

Merged
merged 3 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion cmd/telegraf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func runApp(args []string, outputBuffer io.Writer, pprof Server, c TelegrafConfi
err := PrintInputConfig(cCtx.String("usage"), outputBuffer)
err2 := PrintOutputConfig(cCtx.String("usage"), outputBuffer)
if err != nil && err2 != nil {
return fmt.Errorf("%w and %s", err, err2)
return fmt.Errorf("%w and %w", err, err2)
}
return nil
// DEPRECATED
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ func fetchConfig(u *url.URL) ([]byte, error) {
body, err, retry := func() ([]byte, error, bool) {
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, fmt.Errorf("retry %d of %d failed connecting to HTTP config server %w", i, retries, err), false
return nil, fmt.Errorf("retry %d of %d failed connecting to HTTP config server: %w", i, retries, err), false
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
Expand Down
2 changes: 1 addition & 1 deletion testutil/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (c *Container) LookupMappedPorts() error {

p, err := c.container.MappedPort(c.ctx, nat.Port(port))
if err != nil {
return fmt.Errorf("failed to find '%s' - %w", port, err)
return fmt.Errorf("failed to find %q - %w", port, err)
zak-pawel marked this conversation as resolved.
Show resolved Hide resolved
}
fmt.Printf("mapped container port '%s' to host port '%s'\n", port, p.Port())
c.Ports[port] = p.Port()
Expand Down