From bb36b4f9e1e079b13d5ad07c578dc22917244644 Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 31 Jul 2018 22:11:47 -0400 Subject: [PATCH] Add server list as another variable, allowing the use of configs/secrets --- resolver.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resolver.go b/resolver.go index 1fbace8..4cb41ab 100644 --- a/resolver.go +++ b/resolver.go @@ -48,7 +48,9 @@ func NewResolver(c ResolvSettings) *Resolver { 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) }