diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2019-09-20 16:53:21 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2019-09-20 16:53:21 +0200 |
commit | c3a23ce2f5140c57ca452fe83af809bdedb1b10a (patch) | |
tree | 0656696c0ce94b85e1631d8d1e15f5a95d7490e0 /plugins/meta/dnsname/result.go | |
parent | 2ca19cca4d3019c903000fe57053b483ac0745c2 (diff) |
use errors.Errorf instead of fmt.Errorf
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'plugins/meta/dnsname/result.go')
-rw-r--r-- | plugins/meta/dnsname/result.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/meta/dnsname/result.go b/plugins/meta/dnsname/result.go index b2e78a1..3d46029 100644 --- a/plugins/meta/dnsname/result.go +++ b/plugins/meta/dnsname/result.go @@ -1,10 +1,10 @@ package main import ( - "fmt" "net" "github.com/containernetworking/cni/pkg/types/current" + "github.com/pkg/errors" ) // getIPs iterates a result and returns all the IP addresses @@ -24,7 +24,7 @@ func getIPs(r *current.Result) ([]*net.IPNet, error) { if isInterfaceIndexSandox(*ip.Interface, r) { ips = append(ips, &ip.Address) } else { - return nil, fmt.Errorf("unable to check if interface has a sandbox due to index being out of range") + return nil, errors.Errorf("unable to check if interface has a sandbox due to index being out of range") } } } |