Properly wrap errors from config.go
Co-authored-by: Leo Antunes <leo@costela.net>
This commit is contained in:
parent
bce8a0451a
commit
7adb944f92
|
@ -51,7 +51,7 @@ func loadConfig() (*config, error) {
|
||||||
// Compute the actual bind address based on the provided interface
|
// Compute the actual bind address based on the provided interface
|
||||||
iface, err := net.InterfaceByName(config.BindIface)
|
iface, err := net.InterfaceByName(config.BindIface)
|
||||||
if err != nil {
|
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()
|
addrs, err := iface.Addrs()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue