Properly wrap errors from config.go

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

View File

@ -55,7 +55,7 @@ func loadConfig() (*config, error) {
} }
addrs, err := iface.Addrs() addrs, err := iface.Addrs()
if err != nil { if err != nil {
return nil, fmt.Errorf("no available ip address on interface %s", config.BindIface) return nil, fmt.Errorf("could not get addresses for interface %s: %w", config.BindIface, err)
} }
if len(addrs) > 0 { if len(addrs) > 0 {
if addr, ok := addrs[0].(*net.IPNet); ok { if addr, ok := addrs[0].(*net.IPNet); ok {