Skip to content

Commit

Permalink
log.fatal instead of panic
Browse files Browse the repository at this point in the history
  • Loading branch information
ajones committed Oct 20, 2021
1 parent 2f8d5bd commit 56b4981
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/fwdIp/fwdIp.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func getBaseUnreservedIP(opts ForwardIPOpts) []byte {
fwdCfg := getForwardConfiguration(opts)
ip, err := ipFromString(fwdCfg.BaseUnreservedIP)
if err != nil {
panic(err)
log.Fatal(err)
}
return ip
}
Expand All @@ -194,7 +194,7 @@ func blockNonLoopbackIPs(f *ForwardConfiguration) {
}
for _, svcCfg := range f.ServiceConfigurations {
if ip, err := ipFromString(svcCfg.IP); err != nil || !ip.IsLoopback() {
panic(fmt.Sprintf("IP %s for %s is not in the range 127.0.0.0/8", svcCfg.IP, svcCfg.Name))
log.Fatal(fmt.Sprintf("IP %s for %s is not in the range 127.0.0.0/8", svcCfg.IP, svcCfg.Name))
}
}
}
Expand Down

0 comments on commit 56b4981

Please sign in to comment.