mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
plugin/forward: add REFUSED test (#1878)
add a test to see if we copy the rcode correctly. Some minor cleanup in import ordering and renaming NewUpstream to New as we already are in the upstream package.
This commit is contained in:
@@ -18,9 +18,9 @@ type Upstream struct {
|
||||
Forward *proxy.Proxy
|
||||
}
|
||||
|
||||
// NewUpstream creates a new Upstream for given destination(s). If dests is empty
|
||||
// it default to upstreaming to Self.
|
||||
func NewUpstream(dests []string) (Upstream, error) {
|
||||
// New creates a new Upstream for given destination(s). If dests is empty it default to upstreaming to
|
||||
// the coredns process.
|
||||
func New(dests []string) (Upstream, error) {
|
||||
u := Upstream{}
|
||||
if len(dests) == 0 {
|
||||
u.self = true
|
||||
|
||||
Reference in New Issue
Block a user