diff --git a/caddy.go b/caddy.go index bfa4c9c7..8a241667 100644 --- a/caddy.go +++ b/caddy.go @@ -199,7 +199,7 @@ func GoModule() *debug.Module { } // goModule is the name of this Go module. -const goModule = "github.com/mholt/caddy" +const goModule = "github.com/caddyserver/caddy/v2" // CtxKey is a value type for use with context.WithValue. type CtxKey string diff --git a/cmd/caddy/main.go b/cmd/caddy/main.go index 03f5748c..c1824d74 100644 --- a/cmd/caddy/main.go +++ b/cmd/caddy/main.go @@ -15,23 +15,23 @@ package main import ( - caddycmd "github.com/caddyserver/caddy/cmd" + caddycmd "github.com/caddyserver/caddy/v2/cmd" // this is where modules get plugged in - _ "github.com/caddyserver/caddy/modules/caddyhttp" - _ "github.com/caddyserver/caddy/modules/caddyhttp/encode" - _ "github.com/caddyserver/caddy/modules/caddyhttp/encode/brotli" - _ "github.com/caddyserver/caddy/modules/caddyhttp/encode/gzip" - _ "github.com/caddyserver/caddy/modules/caddyhttp/encode/zstd" - _ "github.com/caddyserver/caddy/modules/caddyhttp/fileserver" - _ "github.com/caddyserver/caddy/modules/caddyhttp/headers" - _ "github.com/caddyserver/caddy/modules/caddyhttp/markdown" - _ "github.com/caddyserver/caddy/modules/caddyhttp/requestbody" - _ "github.com/caddyserver/caddy/modules/caddyhttp/reverseproxy" - _ "github.com/caddyserver/caddy/modules/caddyhttp/rewrite" - _ "github.com/caddyserver/caddy/modules/caddyhttp/templates" - _ "github.com/caddyserver/caddy/modules/caddytls" - _ "github.com/caddyserver/caddy/modules/caddytls/standardstek" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/fileserver" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/headers" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/markdown" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/requestbody" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite" + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/templates" + _ "github.com/caddyserver/caddy/v2/modules/caddytls" + _ "github.com/caddyserver/caddy/v2/modules/caddytls/standardstek" ) func main() { diff --git a/cmd/commands.go b/cmd/commands.go index d25f445e..f98b4019 100644 --- a/cmd/commands.go +++ b/cmd/commands.go @@ -26,7 +26,7 @@ import ( "path/filepath" "strings" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" "github.com/mholt/certmagic" "github.com/mitchellh/go-ps" ) diff --git a/go.mod b/go.mod index 62e31922..70e7bb6f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/caddyserver/caddy +module github.com/caddyserver/caddy/v2 go 1.12 diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go index aa31227c..7d30178e 100644 --- a/modules/caddyhttp/caddyhttp.go +++ b/modules/caddyhttp/caddyhttp.go @@ -26,8 +26,8 @@ import ( "strings" "time" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddytls" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddytls" "github.com/mholt/certmagic" ) diff --git a/modules/caddyhttp/caddylog/log.go b/modules/caddyhttp/caddylog/log.go index fef826b6..1ac249cd 100644 --- a/modules/caddyhttp/caddylog/log.go +++ b/modules/caddyhttp/caddylog/log.go @@ -19,8 +19,8 @@ import ( "net/http" "time" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { diff --git a/modules/caddyhttp/encode/brotli/brotli.go b/modules/caddyhttp/encode/brotli/brotli.go index 38af6c63..0890d438 100644 --- a/modules/caddyhttp/encode/brotli/brotli.go +++ b/modules/caddyhttp/encode/brotli/brotli.go @@ -18,8 +18,8 @@ import ( "fmt" "github.com/andybalholm/brotli" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp/encode" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode" ) func init() { diff --git a/modules/caddyhttp/encode/encode.go b/modules/caddyhttp/encode/encode.go index 3eebe686..2b459178 100644 --- a/modules/caddyhttp/encode/encode.go +++ b/modules/caddyhttp/encode/encode.go @@ -30,8 +30,8 @@ import ( "strings" "sync" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { diff --git a/modules/caddyhttp/encode/gzip/gzip.go b/modules/caddyhttp/encode/gzip/gzip.go index 9dea9b02..45c5f548 100644 --- a/modules/caddyhttp/encode/gzip/gzip.go +++ b/modules/caddyhttp/encode/gzip/gzip.go @@ -19,8 +19,8 @@ import ( "compress/gzip" // TODO: consider using https://github.com/klauspost/compress/gzip "fmt" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp/encode" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode" ) func init() { diff --git a/modules/caddyhttp/encode/zstd/zstd.go b/modules/caddyhttp/encode/zstd/zstd.go index 40bcedca..1470bafa 100644 --- a/modules/caddyhttp/encode/zstd/zstd.go +++ b/modules/caddyhttp/encode/zstd/zstd.go @@ -15,8 +15,8 @@ package caddyzstd import ( - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp/encode" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode" "github.com/klauspost/compress/zstd" ) diff --git a/modules/caddyhttp/errors.go b/modules/caddyhttp/errors.go index 7a1ea43b..db643998 100644 --- a/modules/caddyhttp/errors.go +++ b/modules/caddyhttp/errors.go @@ -21,7 +21,7 @@ import ( "runtime" "strings" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) // Error is a convenient way for a Handler to populate the diff --git a/modules/caddyhttp/fileserver/browse.go b/modules/caddyhttp/fileserver/browse.go index 9dd09e9e..e0e6de2c 100644 --- a/modules/caddyhttp/fileserver/browse.go +++ b/modules/caddyhttp/fileserver/browse.go @@ -23,8 +23,8 @@ import ( "path" "strings" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) // Browse configures directory browsing. diff --git a/modules/caddyhttp/fileserver/browselisting.go b/modules/caddyhttp/fileserver/browselisting.go index d81e86c3..b2349f86 100644 --- a/modules/caddyhttp/fileserver/browselisting.go +++ b/modules/caddyhttp/fileserver/browselisting.go @@ -23,7 +23,7 @@ import ( "strings" "time" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" "github.com/dustin/go-humanize" ) diff --git a/modules/caddyhttp/fileserver/matcher.go b/modules/caddyhttp/fileserver/matcher.go index 2ff873fe..da36eaa9 100644 --- a/modules/caddyhttp/fileserver/matcher.go +++ b/modules/caddyhttp/fileserver/matcher.go @@ -18,8 +18,8 @@ import ( "net/http" "os" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { diff --git a/modules/caddyhttp/fileserver/staticfiles.go b/modules/caddyhttp/fileserver/staticfiles.go index ff48961f..67a337b1 100644 --- a/modules/caddyhttp/fileserver/staticfiles.go +++ b/modules/caddyhttp/fileserver/staticfiles.go @@ -27,8 +27,8 @@ import ( "strings" "time" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { diff --git a/modules/caddyhttp/headers/headers.go b/modules/caddyhttp/headers/headers.go index b9a10d48..f1b45daa 100644 --- a/modules/caddyhttp/headers/headers.go +++ b/modules/caddyhttp/headers/headers.go @@ -18,8 +18,8 @@ import ( "net/http" "strings" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { diff --git a/modules/caddyhttp/markdown/markdown.go b/modules/caddyhttp/markdown/markdown.go index ec5fc264..146a60dc 100644 --- a/modules/caddyhttp/markdown/markdown.go +++ b/modules/caddyhttp/markdown/markdown.go @@ -23,8 +23,8 @@ import ( "gopkg.in/russross/blackfriday.v2" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { diff --git a/modules/caddyhttp/matchers.go b/modules/caddyhttp/matchers.go index fe5a6cb4..6c5a23ee 100644 --- a/modules/caddyhttp/matchers.go +++ b/modules/caddyhttp/matchers.go @@ -27,8 +27,8 @@ import ( "regexp" "strings" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/pkg/caddyscript" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/pkg/caddyscript" "go.starlark.net/starlark" ) diff --git a/modules/caddyhttp/matchers_test.go b/modules/caddyhttp/matchers_test.go index cc934b11..48783aed 100644 --- a/modules/caddyhttp/matchers_test.go +++ b/modules/caddyhttp/matchers_test.go @@ -22,7 +22,7 @@ import ( "net/url" "testing" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) func TestHostMatcher(t *testing.T) { diff --git a/modules/caddyhttp/replacer.go b/modules/caddyhttp/replacer.go index 5558eb95..11f3bdb3 100644 --- a/modules/caddyhttp/replacer.go +++ b/modules/caddyhttp/replacer.go @@ -21,7 +21,7 @@ import ( "path" "strings" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) // TODO: A simple way to format or escape or encode each value would be nice diff --git a/modules/caddyhttp/requestbody/requestbody.go b/modules/caddyhttp/requestbody/requestbody.go index 251ef1ed..14743f4c 100644 --- a/modules/caddyhttp/requestbody/requestbody.go +++ b/modules/caddyhttp/requestbody/requestbody.go @@ -17,8 +17,8 @@ package requestbody import ( "net/http" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { diff --git a/modules/caddyhttp/reverseproxy/module.go b/modules/caddyhttp/reverseproxy/module.go index b2467120..72946b71 100755 --- a/modules/caddyhttp/reverseproxy/module.go +++ b/modules/caddyhttp/reverseproxy/module.go @@ -15,7 +15,7 @@ package reverseproxy import ( - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) // Register caddy module. diff --git a/modules/caddyhttp/reverseproxy/upstream.go b/modules/caddyhttp/reverseproxy/upstream.go index bcbcd224..a7fea3ef 100755 --- a/modules/caddyhttp/reverseproxy/upstream.go +++ b/modules/caddyhttp/reverseproxy/upstream.go @@ -28,7 +28,7 @@ import ( "sync/atomic" "time" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) // CircuitBreaker defines the functionality of a circuit breaker module. diff --git a/modules/caddyhttp/rewrite/rewrite.go b/modules/caddyhttp/rewrite/rewrite.go index e56a7583..9060e223 100644 --- a/modules/caddyhttp/rewrite/rewrite.go +++ b/modules/caddyhttp/rewrite/rewrite.go @@ -19,8 +19,8 @@ import ( "net/url" "strings" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go index 18a2f152..0882be6c 100644 --- a/modules/caddyhttp/routes.go +++ b/modules/caddyhttp/routes.go @@ -19,7 +19,7 @@ import ( "fmt" "net/http" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) // ServerRoute represents a set of matching rules, diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index 3746318f..14601520 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -23,8 +23,8 @@ import ( "strconv" "strings" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddytls" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddytls" ) // Server is an HTTP server. diff --git a/modules/caddyhttp/staticresp.go b/modules/caddyhttp/staticresp.go index 7fbb14dc..3f43c927 100644 --- a/modules/caddyhttp/staticresp.go +++ b/modules/caddyhttp/staticresp.go @@ -19,7 +19,7 @@ import ( "net/http" "strconv" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) func init() { diff --git a/modules/caddyhttp/staticresp_test.go b/modules/caddyhttp/staticresp_test.go index d75bf6c0..b518bb0e 100644 --- a/modules/caddyhttp/staticresp_test.go +++ b/modules/caddyhttp/staticresp_test.go @@ -21,7 +21,7 @@ import ( "net/http/httptest" "testing" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) func TestStaticResponseHandler(t *testing.T) { diff --git a/modules/caddyhttp/table.go b/modules/caddyhttp/table.go index 167a33b6..7d986828 100644 --- a/modules/caddyhttp/table.go +++ b/modules/caddyhttp/table.go @@ -17,7 +17,7 @@ package caddyhttp import ( "net/http" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) func init() { diff --git a/modules/caddyhttp/templates/templates.go b/modules/caddyhttp/templates/templates.go index c9ed1c89..e5bfa350 100644 --- a/modules/caddyhttp/templates/templates.go +++ b/modules/caddyhttp/templates/templates.go @@ -22,8 +22,8 @@ import ( "strconv" "strings" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { diff --git a/modules/caddyhttp/templates/tplcontext.go b/modules/caddyhttp/templates/tplcontext.go index 988a4e8b..548b3e13 100644 --- a/modules/caddyhttp/templates/tplcontext.go +++ b/modules/caddyhttp/templates/tplcontext.go @@ -26,7 +26,7 @@ import ( "sync" "github.com/Masterminds/sprig" - "github.com/caddyserver/caddy/modules/caddyhttp" + "github.com/caddyserver/caddy/v2/modules/caddyhttp" "gopkg.in/russross/blackfriday.v2" ) diff --git a/modules/caddytls/acmemanager.go b/modules/caddytls/acmemanager.go index 7969e28e..9f9924e2 100644 --- a/modules/caddytls/acmemanager.go +++ b/modules/caddytls/acmemanager.go @@ -22,7 +22,7 @@ import ( "github.com/go-acme/lego/certcrypto" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" "github.com/go-acme/lego/challenge" "github.com/mholt/certmagic" ) diff --git a/modules/caddytls/connpolicy.go b/modules/caddytls/connpolicy.go index ab0fbca3..8cb6ffea 100644 --- a/modules/caddytls/connpolicy.go +++ b/modules/caddytls/connpolicy.go @@ -21,7 +21,7 @@ import ( "fmt" "strings" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" "github.com/go-acme/lego/challenge/tlsalpn01" "github.com/mholt/certmagic" ) diff --git a/modules/caddytls/fileloader.go b/modules/caddytls/fileloader.go index d673ebf9..5f277c88 100644 --- a/modules/caddytls/fileloader.go +++ b/modules/caddytls/fileloader.go @@ -19,7 +19,7 @@ import ( "fmt" "io/ioutil" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) func init() { diff --git a/modules/caddytls/folderloader.go b/modules/caddytls/folderloader.go index 53ed3783..24a7fbb9 100644 --- a/modules/caddytls/folderloader.go +++ b/modules/caddytls/folderloader.go @@ -24,7 +24,7 @@ import ( "path/filepath" "strings" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) func init() { diff --git a/modules/caddytls/matchers.go b/modules/caddytls/matchers.go index 28728d4d..ee146d47 100644 --- a/modules/caddytls/matchers.go +++ b/modules/caddytls/matchers.go @@ -17,7 +17,7 @@ package caddytls import ( "crypto/tls" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) // MatchServerName matches based on SNI. diff --git a/modules/caddytls/sessiontickets.go b/modules/caddytls/sessiontickets.go index b71cb7d8..c47f8231 100644 --- a/modules/caddytls/sessiontickets.go +++ b/modules/caddytls/sessiontickets.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" ) // SessionTicketService configures and manages TLS session tickets. diff --git a/modules/caddytls/standardstek/stek.go b/modules/caddytls/standardstek/stek.go index 00e69d84..6a4b1c82 100644 --- a/modules/caddytls/standardstek/stek.go +++ b/modules/caddytls/standardstek/stek.go @@ -19,8 +19,8 @@ import ( "sync" "time" - "github.com/caddyserver/caddy" - "github.com/caddyserver/caddy/modules/caddytls" + "github.com/caddyserver/caddy/v2" + "github.com/caddyserver/caddy/v2/modules/caddytls" ) func init() { diff --git a/modules/caddytls/tls.go b/modules/caddytls/tls.go index b38657b9..e70fbd1c 100644 --- a/modules/caddytls/tls.go +++ b/modules/caddytls/tls.go @@ -23,7 +23,7 @@ import ( "os" "time" - "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/v2" "github.com/go-acme/lego/challenge" "github.com/mholt/certmagic" "golang.org/x/time/rate" diff --git a/modules/caddytls/values.go b/modules/caddytls/values.go index afd4044f..97443d82 100644 --- a/modules/caddytls/values.go +++ b/modules/caddytls/values.go @@ -69,7 +69,7 @@ var defaultCipherSuitesWithoutAESNI = []uint16{ // getOptimalDefaultCipherSuites returns an appropriate cipher // suite to use depending on the hardware support for AES. // -// See https://github.com/mholt/caddy/issues/1674 +// See https://github.com/caddyserver/caddy/issues/1674 func getOptimalDefaultCipherSuites() []uint16 { if cpuid.CPU.AesNi() { return defaultCipherSuitesWithAESNI diff --git a/pkg/caddyscript/matcherenv.go b/pkg/caddyscript/matcherenv.go index 38a54bcc..6c9fb501 100644 --- a/pkg/caddyscript/matcherenv.go +++ b/pkg/caddyscript/matcherenv.go @@ -17,7 +17,7 @@ package caddyscript import ( "net/http" - caddyscript "github.com/caddyserver/caddy/pkg/caddyscript/lib" + caddyscript "github.com/caddyserver/caddy/v2/pkg/caddyscript/lib" "go.starlark.net/starlark" )