Add server list as another variable, allowing the use of configs/secrets

This commit is contained in:
Tyler 2018-07-31 22:11:47 -04:00
parent cce0739a9b
commit bb36b4f9e1
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@ func NewResolver(c ResolvSettings) *Resolver {
config: &c, config: &c,
} }
if len(c.ServerListFile) > 0 { if serverList := os.Getenv("SERVER_LIST_FILE"); serverList != "" {
r.ReadServerListFile(serverList)
} else if len(c.ServerListFile) > 0 {
r.ReadServerListFile(c.ServerListFile) r.ReadServerListFile(c.ServerListFile)
} }