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

fix(lint): govet and staticcheck issues #1985

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +2058,7 @@ func TestFinalize(t *testing.T) {
}
default:
if eq, err := tc.isEqual(tc.test, tc.expt); !eq {
t.Errorf(err.Error())
t.Error(err.Error())
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion dependency/catalog_datacenters.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (d *CatalogDatacentersQuery) Fetch(clients *ClientSet, opts *QueryOptions)

result, err := clients.Consul().Catalog().Datacenters()
if err != nil {
return nil, nil, errors.Wrapf(err, d.String())
return nil, nil, errors.Wrap(err, d.String())
}

// If the user opted in for skipping "down" datacenters, figure out which
Expand Down
2 changes: 1 addition & 1 deletion dependency/catalog_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (d *CatalogNodeQuery) Fetch(clients *ClientSet, opts *QueryOptions) (interf
var err error
name, err = clients.Consul().Agent().NodeName()
if err != nil {
return nil, nil, errors.Wrapf(err, d.String())
return nil, nil, errors.Wrap(err, d.String())
}
}

Expand Down
2 changes: 1 addition & 1 deletion dependency/vault_pki_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

// go:build ignore
//go:build ignore

package dependency

Expand Down
2 changes: 1 addition & 1 deletion template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func redactinator(used *dep.Set, b *Brain, err error) error {
}
}
}
return fmt.Errorf(strings.NewReplacer(pairs...).Replace(err.Error()))
return errors.New(strings.NewReplacer(pairs...).Replace(err.Error()))
}

// funcMapInput is input to the funcMap, which builds the template functions.
Expand Down
Loading