diff options
Diffstat (limited to 'args')
| -rw-r--r-- | args/args.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/args/args.go b/args/args.go index f71e8e3..8465fc8 100644 --- a/args/args.go +++ b/args/args.go @@ -22,8 +22,9 @@ type Arguments struct { OauthConfig *oauth2.Config OauthUserInfoURI string - Dns bool - DnsPort int + DnsResolvers []string + Dns bool + DnsPort int CloudflareToken string CloudflareZone string @@ -36,6 +37,7 @@ func GetArgs() (*Arguments, error) { databasePath := flag.String("database-path", "./hatecomputers.db", "Path to the SQLite database") templatePath := flag.String("template-path", "./templates", "Path to the template directory") staticPath := flag.String("static-path", "./static", "Path to the static directory") + dnsResolvers := flag.String("dns-resolvers", "1.1.1.1,1.0.0.1", "Comma-separated list of DNS resolvers") scheduler := flag.Bool("scheduler", false, "Run scheduled jobs via cron") migrate := flag.Bool("migrate", false, "Run the migrations") @@ -101,8 +103,10 @@ func GetArgs() (*Arguments, error) { Server: *server, Migrate: *migrate, Scheduler: *scheduler, - Dns: *dns, - DnsPort: *dnsPort, + + Dns: *dns, + DnsPort: *dnsPort, + DnsResolvers: strings.Split(*dnsResolvers, ","), OauthConfig: oauthConfig, OauthUserInfoURI: oauthUserInfoURI, |
