From 21ddfe8290bb9f863f3f9175737d80d5a2782b39 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Tue, 16 Aug 2016 09:24:37 -0700 Subject: [PATCH] Move singleflight out of middleware/ (#217) It is not middleware, so move it up one level. It was also use from core/ showing that indeed its use is not limited to middlewares. --- core/setup/etcd.go | 2 +- middleware/dnssec/dnssec.go | 2 +- middleware/etcd/etcd.go | 2 +- middleware/etcd/setup_test.go | 2 +- {middleware/singleflight => singleflight}/singleflight.go | 0 {middleware/singleflight => singleflight}/singleflight_test.go | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename {middleware/singleflight => singleflight}/singleflight.go (100%) rename {middleware/singleflight => singleflight}/singleflight_test.go (100%) diff --git a/core/setup/etcd.go b/core/setup/etcd.go index 2160b540c..b90297abd 100644 --- a/core/setup/etcd.go +++ b/core/setup/etcd.go @@ -11,7 +11,7 @@ import ( "github.com/miekg/coredns/middleware" "github.com/miekg/coredns/middleware/etcd" "github.com/miekg/coredns/middleware/proxy" - "github.com/miekg/coredns/middleware/singleflight" + "github.com/miekg/coredns/singleflight" etcdc "github.com/coreos/etcd/client" "golang.org/x/net/context" diff --git a/middleware/dnssec/dnssec.go b/middleware/dnssec/dnssec.go index 64359d8c9..4907f1621 100644 --- a/middleware/dnssec/dnssec.go +++ b/middleware/dnssec/dnssec.go @@ -4,7 +4,7 @@ import ( "time" "github.com/miekg/coredns/middleware" - "github.com/miekg/coredns/middleware/singleflight" + "github.com/miekg/coredns/singleflight" "github.com/miekg/dns" gcache "github.com/patrickmn/go-cache" diff --git a/middleware/etcd/etcd.go b/middleware/etcd/etcd.go index 54346225b..87a82e8cb 100644 --- a/middleware/etcd/etcd.go +++ b/middleware/etcd/etcd.go @@ -10,7 +10,7 @@ import ( "github.com/miekg/coredns/middleware" "github.com/miekg/coredns/middleware/etcd/msg" "github.com/miekg/coredns/middleware/proxy" - "github.com/miekg/coredns/middleware/singleflight" + "github.com/miekg/coredns/singleflight" etcdc "github.com/coreos/etcd/client" "golang.org/x/net/context" diff --git a/middleware/etcd/setup_test.go b/middleware/etcd/setup_test.go index 9391bf3c7..799b4a1bb 100644 --- a/middleware/etcd/setup_test.go +++ b/middleware/etcd/setup_test.go @@ -11,8 +11,8 @@ import ( "github.com/miekg/coredns/middleware" "github.com/miekg/coredns/middleware/etcd/msg" "github.com/miekg/coredns/middleware/proxy" - "github.com/miekg/coredns/middleware/singleflight" "github.com/miekg/coredns/middleware/test" + "github.com/miekg/coredns/singleflight" etcdc "github.com/coreos/etcd/client" "github.com/miekg/dns" diff --git a/middleware/singleflight/singleflight.go b/singleflight/singleflight.go similarity index 100% rename from middleware/singleflight/singleflight.go rename to singleflight/singleflight.go diff --git a/middleware/singleflight/singleflight_test.go b/singleflight/singleflight_test.go similarity index 100% rename from middleware/singleflight/singleflight_test.go rename to singleflight/singleflight_test.go