fix refactoring

This commit is contained in:
Veselkov Konstantin 2018-01-28 22:53:30 +04:00
parent 8e16bd7d77
commit 5f38e1148a
2 changed files with 4 additions and 3 deletions

View File

@ -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")
}

View File

@ -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,