diff options
| author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-04-07 17:04:43 -0600 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-04-07 17:04:43 -0600 |
| commit | 5768f07ce51271239b16b4cfda6206366002cefc (patch) | |
| tree | fec8eea99a2113ff943624779d8e6afe33711f52 /args | |
| parent | 83cc6267fd5ce2f61200314424c5f400f65ff2ba (diff) | |
| download | hatecomputers.club-5768f07ce51271239b16b4cfda6206366002cefc.tar.gz hatecomputers.club-5768f07ce51271239b16b4cfda6206366002cefc.zip | |
init
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, |
