diff --git a/proxy/upstreams.go b/proxy/upstreams.go index f297bb6b6..dfb44e741 100644 --- a/proxy/upstreams.go +++ b/proxy/upstreams.go @@ -104,12 +104,13 @@ func ParseUpstreamsConfig( return p.parse(lines) } -// ParseError is an error containing an index of a list of upstreams. +// ParseError is an error which contains an index of the line of the upstream +// list. type ParseError struct { // err is the original error. err error - // Idx is an index of a list of upstreams. + // Idx is an index of the line of the upstream list. Idx int } @@ -192,7 +193,7 @@ func (p *configParser) parseLine(idx int, confLine string) (err error) { return nil } - return errors.Error("not a domain-specific upstream") + return nil } for _, u := range upstreams { @@ -252,8 +253,7 @@ func (p *configParser) specifyUpstream( // create an upstream dnsUpstream, err = upstream.AddressToUpstream(u, p.options.Clone()) if err != nil { - return fmt.Errorf("cannot prepare the upstream %d %q (%s): %s", - idx, confLine, p.options.Bootstrap, err) + return fmt.Errorf("cannot prepare the upstream %d %q: %s", idx, confLine, err) } // save to the index