1
0
Fork 0
mirror of https://gitlab.com/pnx-tools/dns-updater.git synced 2026-06-16 05:54:56 +02:00

app/app.go: in NewApp() return error if lookup services can't be found.

This commit is contained in:
Henrik Hautakoski 2023-12-02 11:53:46 +01:00
parent 769962f135
commit 7e8ce30b87

View file

@ -1,6 +1,7 @@
package app
import (
"fmt"
"net"
"dnsupdater/provider/manager"
@ -29,6 +30,10 @@ func NewApp(config *Config) (*App, error) {
l := resolver.Get(config.Services.IPLookup)
if l == nil {
return nil, fmt.Errorf("Failed to load lookup service: %s", config.Services.IPLookup)
}
return &App{
ProviderManager: providerMgr,
IPLookupService: resolver.Get(config.Services.IPLookup),