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:
parent
769962f135
commit
7e8ce30b87
1 changed files with 5 additions and 0 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue