diff options
Diffstat (limited to 'libpod/network/files.go')
-rw-r--r-- | libpod/network/files.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libpod/network/files.go b/libpod/network/files.go index 34cc5fa73..83cb1c23a 100644 --- a/libpod/network/files.go +++ b/libpod/network/files.go @@ -15,6 +15,9 @@ import ( "github.com/sirupsen/logrus" ) +// ErrNoSuchNetworkInterface indicates that no network interface exists +var ErrNoSuchNetworkInterface = errors.New("unable to find interface name for network") + // GetCNIConfDir get CNI configuration directory func GetCNIConfDir(configArg *config.Config) string { if len(configArg.Network.NetworkConfigDir) < 1 { @@ -172,7 +175,7 @@ func GetInterfaceNameFromConfig(path string) (string, error) { } } if len(name) == 0 { - return "", errors.New("unable to find interface name for network") + return "", ErrNoSuchNetworkInterface } return name, nil } |