Skip to content

Commit

Permalink
For caddy v1 in our org (coredns#4018)
Browse files Browse the repository at this point in the history
* For caddy v1 in our org

This RP changes all imports for caddyserver/caddy to coredns/caddy. This
is the v1 code of caddy.

For the coredns/caddy repo the following changes have been made:

* anything not needed by us is deleted
* all `telemetry` stuff is deleted
* all its import paths are also changed to point to coredns/caddy
* the v1 branch has been moved to the master branch
* a v1.1.0 tag has been added to signal the latest release

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix imports

Signed-off-by: Miek Gieben <miek@miek.nl>

* Group coredns/caddy with out plugins

Signed-off-by: Miek Gieben <miek@miek.nl>

* remove this file

Signed-off-by: Miek Gieben <miek@miek.nl>

* Relax import ordering

github.com/coredns is now also a coredns dep, this makes
github.com/coredns/caddy fit more natural in the list.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix final import

Signed-off-by: Miek Gieben <miek@miek.nl>
  • Loading branch information
miekg authored Sep 24, 2020
1 parent 24e668e commit b003d06
Show file tree
Hide file tree
Showing 121 changed files with 135 additions and 289 deletions.
3 changes: 1 addition & 2 deletions core/dnsserver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import (
"crypto/tls"
"fmt"

"github.com/coredns/caddy"
"github.com/coredns/coredns/plugin"

"github.com/caddyserver/caddy"
)

// Config configuration for a single server.
Expand Down
5 changes: 2 additions & 3 deletions core/dnsserver/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import (
"strings"
"time"

"github.com/coredns/caddy"
"github.com/coredns/caddy/caddyfile"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/dnsutil"
"github.com/coredns/coredns/plugin/pkg/parse"
"github.com/coredns/coredns/plugin/pkg/transport"

"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/caddyfile"
)

const serverType = "dns"
Expand Down
2 changes: 1 addition & 1 deletion core/dnsserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"sync"
"time"

"github.com/coredns/caddy"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/metrics/vars"
"github.com/coredns/coredns/plugin/pkg/edns"
Expand All @@ -20,7 +21,6 @@ import (
"github.com/coredns/coredns/plugin/pkg/transport"
"github.com/coredns/coredns/request"

"github.com/caddyserver/caddy"
"github.com/miekg/dns"
ot "github.com/opentracing/opentracing-go"
)
Expand Down
2 changes: 1 addition & 1 deletion core/dnsserver/server_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"fmt"
"net"

"github.com/coredns/caddy"
"github.com/coredns/coredns/pb"
"github.com/coredns/coredns/plugin/pkg/reuseport"
"github.com/coredns/coredns/plugin/pkg/transport"

"github.com/caddyserver/caddy"
"github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc"
"github.com/miekg/dns"
"github.com/opentracing/opentracing-go"
Expand Down
3 changes: 1 addition & 2 deletions core/dnsserver/server_https.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import (
"strconv"
"time"

"github.com/coredns/caddy"
"github.com/coredns/coredns/plugin/pkg/dnsutil"
"github.com/coredns/coredns/plugin/pkg/doh"
"github.com/coredns/coredns/plugin/pkg/response"
"github.com/coredns/coredns/plugin/pkg/reuseport"
"github.com/coredns/coredns/plugin/pkg/transport"

"github.com/caddyserver/caddy"
)

// ServerHTTPS represents an instance of a DNS-over-HTTPS server.
Expand Down
2 changes: 1 addition & 1 deletion core/dnsserver/server_tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"net"

"github.com/coredns/caddy"
"github.com/coredns/coredns/plugin/pkg/reuseport"
"github.com/coredns/coredns/plugin/pkg/transport"

"github.com/caddyserver/caddy"
"github.com/miekg/dns"
)

Expand Down
2 changes: 1 addition & 1 deletion core/plugin/zplugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package plugin

import (
// Include all plugins.
_ "github.com/caddyserver/caddy/onevent"
_ "github.com/coredns/caddy/onevent"
_ "github.com/coredns/coredns/plugin/acl"
_ "github.com/coredns/coredns/plugin/any"
_ "github.com/coredns/coredns/plugin/auto"
Expand Down
3 changes: 1 addition & 2 deletions coremain/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import (
"runtime"
"strings"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"

"github.com/caddyserver/caddy"
)

func init() {
Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ require (
github.com/Azure/azure-sdk-for-go v40.6.0+incompatible
github.com/Azure/go-autorest/autorest v0.11.6
github.com/Azure/go-autorest/autorest/azure/auth v0.5.2
github.com/Azure/go-autorest/autorest/to v0.2.0 // indirect
github.com/DataDog/datadog-go v3.5.0+incompatible // indirect
github.com/aws/aws-sdk-go v1.34.22
github.com/caddyserver/caddy v1.0.5
github.com/cenkalti/backoff/v4 v4.0.2
github.com/coredns/caddy v1.1.0
github.com/dnstap/golang-dnstap v0.2.1
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/farsightsec/golang-framestream v0.3.0
github.com/golang/protobuf v1.4.2
github.com/gorilla/websocket v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/imdario/mergo v0.3.9 // indirect
Expand Down
119 changes: 4 additions & 115 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ forward:forward
grpc:grpc
erratic:erratic
whoami:whoami
on:github.com/caddyserver/caddy/onevent
on:github.com/coredns/caddy/onevent
sign:sign
2 changes: 1 addition & 1 deletion plugin/acl/acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"testing"

"github.com/coredns/caddy"
"github.com/coredns/coredns/plugin/test"

"github.com/caddyserver/caddy"
"github.com/miekg/dns"
)

Expand Down
2 changes: 1 addition & 1 deletion plugin/acl/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"net"
"strings"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"

"github.com/caddyserver/caddy"
"github.com/infobloxopen/go-trees/iptree"
"github.com/miekg/dns"
)
Expand Down
2 changes: 1 addition & 1 deletion plugin/acl/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package acl
import (
"testing"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
)

func TestSetup(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions plugin/any/setup.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package any

import (
"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"

"github.com/caddyserver/caddy"
)

func init() { plugin.Register("any", setup) }
Expand Down
3 changes: 1 addition & 2 deletions plugin/auto/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ import (
"regexp"
"time"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/metrics"
clog "github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/plugin/pkg/parse"
"github.com/coredns/coredns/plugin/pkg/upstream"

"github.com/caddyserver/caddy"
)

var log = clog.NewWithPlugin("auto")
Expand Down
2 changes: 1 addition & 1 deletion plugin/auto/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
)

func TestAutoParse(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion plugin/autopath/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package autopath
import (
"fmt"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"

"github.com/caddyserver/caddy"
"github.com/miekg/dns"
)

Expand Down
3 changes: 1 addition & 2 deletions plugin/autopath/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import (
"strings"
"testing"

"github.com/coredns/caddy"
"github.com/coredns/coredns/plugin/test"

"github.com/caddyserver/caddy"
)

func TestSetupAutoPath(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion plugin/azure/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"strings"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/fall"
Expand All @@ -13,7 +14,6 @@ import (
privateAzureDNS "github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns"
azurerest "github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/azure/auth"
"github.com/caddyserver/caddy"
)

var log = clog.NewWithPlugin("azure")
Expand Down
2 changes: 1 addition & 1 deletion plugin/azure/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package azure
import (
"testing"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
)

func TestSetup(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions plugin/bind/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import (
"fmt"
"net"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"

"github.com/caddyserver/caddy"
)

func setup(c *caddy.Controller) error {
Expand Down
3 changes: 1 addition & 2 deletions plugin/bind/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package bind
import (
"testing"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"

"github.com/caddyserver/caddy"
)

func TestSetup(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions plugin/bufsize/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package bufsize
import (
"strconv"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"

"github.com/caddyserver/caddy"
)

func init() { plugin.Register("bufsize", setup) }
Expand Down
2 changes: 1 addition & 1 deletion plugin/bufsize/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
)

func TestSetupBufsize(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions plugin/cache/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import (
"strconv"
"time"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/cache"
clog "github.com/coredns/coredns/plugin/pkg/log"

"github.com/caddyserver/caddy"
)

var log = clog.NewWithPlugin("cache")
Expand Down
2 changes: 1 addition & 1 deletion plugin/cache/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
)

func TestSetup(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion plugin/cancel/cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"time"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"

"github.com/caddyserver/caddy"
"github.com/miekg/dns"
)

Expand Down
2 changes: 1 addition & 1 deletion plugin/cancel/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cancel
import (
"testing"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
)

func TestSetup(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions plugin/chaos/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ package chaos
import (
"sort"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"

"github.com/caddyserver/caddy"
)

func init() { plugin.Register("chaos", setup) }
Expand Down
2 changes: 1 addition & 1 deletion plugin/chaos/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
)

func TestSetupChaos(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion plugin/clouddns/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"context"
"strings"

"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/fall"
clog "github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/plugin/pkg/upstream"

"github.com/caddyserver/caddy"
gcp "google.golang.org/api/dns/v1"
"google.golang.org/api/option"
)
Expand Down
3 changes: 2 additions & 1 deletion plugin/clouddns/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import (
"context"
"testing"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"

"google.golang.org/api/option"
)

Expand Down
3 changes: 1 addition & 2 deletions plugin/debug/debug.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package debug

import (
"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"

"github.com/caddyserver/caddy"
)

func init() { plugin.Register("debug", setup) }
Expand Down
Loading

0 comments on commit b003d06

Please sign in to comment.