diff --git a/config/config_test.go b/config/config_test.go index ceeee8f66..3d282f1fe 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -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()) } } }) diff --git a/dependency/catalog_datacenters.go b/dependency/catalog_datacenters.go index e99767e08..821ac675b 100644 --- a/dependency/catalog_datacenters.go +++ b/dependency/catalog_datacenters.go @@ -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 diff --git a/dependency/catalog_node.go b/dependency/catalog_node.go index 096bc0943..771270474 100644 --- a/dependency/catalog_node.go +++ b/dependency/catalog_node.go @@ -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()) } } diff --git a/dependency/vault_pki_test.go b/dependency/vault_pki_test.go index 0b6727cec..068b91b63 100644 --- a/dependency/vault_pki_test.go +++ b/dependency/vault_pki_test.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -// go:build ignore +//go:build ignore package dependency diff --git a/template/template.go b/template/template.go index 194370e7d..60fa6464d 100644 --- a/template/template.go +++ b/template/template.go @@ -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.