1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Refactor: Move creds.json processing out of InitializeProviders (#1495)

* Rename providers/config to pkg/credsfile

* Refactor InitializeProviders in preparation for v3.16
This commit is contained in:
Tom Limoncelli
2022-05-04 11:02:36 -04:00
committed by GitHub
parent c8a5060dfb
commit 1c43d03d89
3 changed files with 19 additions and 12 deletions

View File

@ -3,6 +3,7 @@ package commands
import (
"fmt"
"github.com/StackExchange/dnscontrol/v3/pkg/credsfile"
"github.com/StackExchange/dnscontrol/v3/providers"
"github.com/urfave/cli/v2"
)
@ -37,7 +38,11 @@ func CreateDomains(args CreateDomainsArgs) error {
if err != nil {
return err
}
_, err = InitializeProviders(args.CredsFile, cfg, false)
providerConfigs, err := credsfile.LoadProviderConfigs(args.CredsFile)
if err != nil {
return err
}
_, err = InitializeProviders(cfg, providerConfigs, false)
if err != nil {
return err
}