Properly wrap errors from config.go

Co-authored-by: Leo Antunes <leo@costela.net>
This commit is contained in:
kaiyou 2020-05-09 12:34:51 +02:00 committed by Leo Antunes
parent bce8a0451a
commit 7adb944f92
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ func loadConfig() (*config, error) {
// Compute the actual bind address based on the provided interface
iface, err := net.InterfaceByName(config.BindIface)
if err != nil {
return nil, fmt.Errorf("cannot find interface %s", config.BindIface)
return nil, fmt.Errorf("could not get interface by name %s: %w", config.BindIface, err)
}
addrs, err := iface.Addrs()
if err != nil {