diff --git a/agent/agent.go b/agent/agent.go index c0a1c19126..2069265082 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -607,7 +607,8 @@ func (a *Agent) reloadWatches(cfg *config.RuntimeConfig) error { if raw, ok := args.([]interface{}); hasArgs && ok { var parsed []string for _, arg := range raw { - if v, ok := arg.(string); !ok { + v, ok := arg.(string) + if !ok { return fmt.Errorf("Watch args must be a list of strings") } diff --git a/agent/dns.go b/agent/dns.go index af5e53f73c..c842f07136 100644 --- a/agent/dns.go +++ b/agent/dns.go @@ -110,12 +110,12 @@ func GetDNSConfig(conf *config.RuntimeConfig) *dnsConfig { func (d *DNSServer) ListenAndServe(network, addr string, notif func()) error { mux := dns.NewServeMux() mux.HandleFunc("arpa.", d.handlePtr) - mux.HandleFunc(s.domain, dhandleQuery) + mux.HandleFunc(d.domain, d.handleQuery) if len(d.recursors) > 0 { mux.HandleFunc(".", d.handleRecurse) } - s.Server = &dns.Server{ + d.Server = &dns.Server{ Addr: addr, Net: network, Handler: mux,