@marcel91200 / caddy Mirror · read-only / commits / fdd871e1
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

go.mod: Append /v2 to module name; update all import paths

See https://github.com/golang/go/wiki/Modules#semantic-import-versioning

Matthew Holt committed Jul 2, 2019 at 12:37 UTC fdd871e1775d1b6d85de43e8ecf7ddc71a72c503
41 files changed +72 -72
caddy.go
+1 -1
@@ -199,7 +199,7 @@ func GoModule() *debug.Module {
199 }
200
201 // goModule is the name of this Go module.
202 -const goModule = "github.com/mholt/caddy"
202 +const goModule = "github.com/caddyserver/caddy/v2"
203
204 // CtxKey is a value type for use with context.WithValue.
205 type CtxKey string
cmd/caddy/main.go
+15 -15
@@ -15,23 +15,23 @@
15 package main
16
17 import (
18 - caddycmd "github.com/caddyserver/caddy/cmd"
18 + caddycmd "github.com/caddyserver/caddy/v2/cmd"
19
20 // this is where modules get plugged in
21 - _ "github.com/caddyserver/caddy/modules/caddyhttp"
22 - _ "github.com/caddyserver/caddy/modules/caddyhttp/encode"
23 - _ "github.com/caddyserver/caddy/modules/caddyhttp/encode/brotli"
24 - _ "github.com/caddyserver/caddy/modules/caddyhttp/encode/gzip"
25 - _ "github.com/caddyserver/caddy/modules/caddyhttp/encode/zstd"
26 - _ "github.com/caddyserver/caddy/modules/caddyhttp/fileserver"
27 - _ "github.com/caddyserver/caddy/modules/caddyhttp/headers"
28 - _ "github.com/caddyserver/caddy/modules/caddyhttp/markdown"
29 - _ "github.com/caddyserver/caddy/modules/caddyhttp/requestbody"
30 - _ "github.com/caddyserver/caddy/modules/caddyhttp/reverseproxy"
31 - _ "github.com/caddyserver/caddy/modules/caddyhttp/rewrite"
32 - _ "github.com/caddyserver/caddy/modules/caddyhttp/templates"
33 - _ "github.com/caddyserver/caddy/modules/caddytls"
34 - _ "github.com/caddyserver/caddy/modules/caddytls/standardstek"
21 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp"
22 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode"
23 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli"
24 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip"
25 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd"
26 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/fileserver"
27 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/headers"
28 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/markdown"
29 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/requestbody"
30 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy"
31 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
32 + _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/templates"
33 + _ "github.com/caddyserver/caddy/v2/modules/caddytls"
34 + _ "github.com/caddyserver/caddy/v2/modules/caddytls/standardstek"
35 )
36
37 func main() {
cmd/commands.go
+1 -1
@@ -26,7 +26,7 @@ import (
26 "path/filepath"
27 "strings"
28
29 - "github.com/caddyserver/caddy"
29 + "github.com/caddyserver/caddy/v2"
30 "github.com/mholt/certmagic"
31 "github.com/mitchellh/go-ps"
32 )
go.mod
+1 -1
@@ -1,4 +1,4 @@
1 -module github.com/caddyserver/caddy
1 +module github.com/caddyserver/caddy/v2
2
3 go 1.12
4
modules/caddyhttp/caddyhttp.go
+2 -2
@@ -26,8 +26,8 @@ import (
26 "strings"
27 "time"
28
29 - "github.com/caddyserver/caddy"
30 - "github.com/caddyserver/caddy/modules/caddytls"
29 + "github.com/caddyserver/caddy/v2"
30 + "github.com/caddyserver/caddy/v2/modules/caddytls"
31 "github.com/mholt/certmagic"
32 )
33
modules/caddyhttp/caddylog/log.go
+2 -2
@@ -19,8 +19,8 @@ import (
19 "net/http"
20 "time"
21
22 - "github.com/caddyserver/caddy"
23 - "github.com/caddyserver/caddy/modules/caddyhttp"
22 + "github.com/caddyserver/caddy/v2"
23 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
24 )
25
26 func init() {
modules/caddyhttp/encode/brotli/brotli.go
+2 -2
@@ -18,8 +18,8 @@ import (
18 "fmt"
19
20 "github.com/andybalholm/brotli"
21 - "github.com/caddyserver/caddy"
22 - "github.com/caddyserver/caddy/modules/caddyhttp/encode"
21 + "github.com/caddyserver/caddy/v2"
22 + "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode"
23 )
24
25 func init() {
modules/caddyhttp/encode/encode.go
+2 -2
@@ -30,8 +30,8 @@ import (
30 "strings"
31 "sync"
32
33 - "github.com/caddyserver/caddy"
34 - "github.com/caddyserver/caddy/modules/caddyhttp"
33 + "github.com/caddyserver/caddy/v2"
34 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
35 )
36
37 func init() {
modules/caddyhttp/encode/gzip/gzip.go
+2 -2
@@ -19,8 +19,8 @@ import (
19 "compress/gzip" // TODO: consider using https://github.com/klauspost/compress/gzip
20 "fmt"
21
22 - "github.com/caddyserver/caddy"
23 - "github.com/caddyserver/caddy/modules/caddyhttp/encode"
22 + "github.com/caddyserver/caddy/v2"
23 + "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode"
24 )
25
26 func init() {
modules/caddyhttp/encode/zstd/zstd.go
+2 -2
@@ -15,8 +15,8 @@
15 package caddyzstd
16
17 import (
18 - "github.com/caddyserver/caddy"
19 - "github.com/caddyserver/caddy/modules/caddyhttp/encode"
18 + "github.com/caddyserver/caddy/v2"
19 + "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode"
20 "github.com/klauspost/compress/zstd"
21 )
22
modules/caddyhttp/errors.go
+1 -1
@@ -21,7 +21,7 @@ import (
21 "runtime"
22 "strings"
23
24 - "github.com/caddyserver/caddy"
24 + "github.com/caddyserver/caddy/v2"
25 )
26
27 // Error is a convenient way for a Handler to populate the
modules/caddyhttp/fileserver/browse.go
+2 -2
@@ -23,8 +23,8 @@ import (
23 "path"
24 "strings"
25
26 - "github.com/caddyserver/caddy"
27 - "github.com/caddyserver/caddy/modules/caddyhttp"
26 + "github.com/caddyserver/caddy/v2"
27 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
28 )
29
30 // Browse configures directory browsing.
modules/caddyhttp/fileserver/browselisting.go
+1 -1
@@ -23,7 +23,7 @@ import (
23 "strings"
24 "time"
25
26 - "github.com/caddyserver/caddy"
26 + "github.com/caddyserver/caddy/v2"
27 "github.com/dustin/go-humanize"
28 )
29
modules/caddyhttp/fileserver/matcher.go
+2 -2
@@ -18,8 +18,8 @@ import (
18 "net/http"
19 "os"
20
21 - "github.com/caddyserver/caddy"
22 - "github.com/caddyserver/caddy/modules/caddyhttp"
21 + "github.com/caddyserver/caddy/v2"
22 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
23 )
24
25 func init() {
modules/caddyhttp/fileserver/staticfiles.go
+2 -2
@@ -27,8 +27,8 @@ import (
27 "strings"
28 "time"
29
30 - "github.com/caddyserver/caddy"
31 - "github.com/caddyserver/caddy/modules/caddyhttp"
30 + "github.com/caddyserver/caddy/v2"
31 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
32 )
33
34 func init() {
modules/caddyhttp/headers/headers.go
+2 -2
@@ -18,8 +18,8 @@ import (
18 "net/http"
19 "strings"
20
21 - "github.com/caddyserver/caddy"
22 - "github.com/caddyserver/caddy/modules/caddyhttp"
21 + "github.com/caddyserver/caddy/v2"
22 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
23 )
24
25 func init() {
modules/caddyhttp/markdown/markdown.go
+2 -2
@@ -23,8 +23,8 @@ import (
23
24 "gopkg.in/russross/blackfriday.v2"
25
26 - "github.com/caddyserver/caddy"
27 - "github.com/caddyserver/caddy/modules/caddyhttp"
26 + "github.com/caddyserver/caddy/v2"
27 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
28 )
29
30 func init() {
modules/caddyhttp/matchers.go
+2 -2
@@ -27,8 +27,8 @@ import (
27 "regexp"
28 "strings"
29
30 - "github.com/caddyserver/caddy"
31 - "github.com/caddyserver/caddy/pkg/caddyscript"
30 + "github.com/caddyserver/caddy/v2"
31 + "github.com/caddyserver/caddy/v2/pkg/caddyscript"
32 "go.starlark.net/starlark"
33 )
34
modules/caddyhttp/matchers_test.go
+1 -1
@@ -22,7 +22,7 @@ import (
22 "net/url"
23 "testing"
24
25 - "github.com/caddyserver/caddy"
25 + "github.com/caddyserver/caddy/v2"
26 )
27
28 func TestHostMatcher(t *testing.T) {
modules/caddyhttp/replacer.go
+1 -1
@@ -21,7 +21,7 @@ import (
21 "path"
22 "strings"
23
24 - "github.com/caddyserver/caddy"
24 + "github.com/caddyserver/caddy/v2"
25 )
26
27 // TODO: A simple way to format or escape or encode each value would be nice
modules/caddyhttp/requestbody/requestbody.go
+2 -2
@@ -17,8 +17,8 @@ package requestbody
17 import (
18 "net/http"
19
20 - "github.com/caddyserver/caddy"
21 - "github.com/caddyserver/caddy/modules/caddyhttp"
20 + "github.com/caddyserver/caddy/v2"
21 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
22 )
23
24 func init() {
modules/caddyhttp/reverseproxy/module.go
+1 -1
@@ -15,7 +15,7 @@
15 package reverseproxy
16
17 import (
18 - "github.com/caddyserver/caddy"
18 + "github.com/caddyserver/caddy/v2"
19 )
20
21 // Register caddy module.
modules/caddyhttp/reverseproxy/upstream.go
+1 -1
@@ -28,7 +28,7 @@ import (
28 "sync/atomic"
29 "time"
30
31 - "github.com/caddyserver/caddy"
31 + "github.com/caddyserver/caddy/v2"
32 )
33
34 // CircuitBreaker defines the functionality of a circuit breaker module.
modules/caddyhttp/rewrite/rewrite.go
+2 -2
@@ -19,8 +19,8 @@ import (
19 "net/url"
20 "strings"
21
22 - "github.com/caddyserver/caddy"
23 - "github.com/caddyserver/caddy/modules/caddyhttp"
22 + "github.com/caddyserver/caddy/v2"
23 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
24 )
25
26 func init() {
modules/caddyhttp/routes.go
+1 -1
@@ -19,7 +19,7 @@ import (
19 "fmt"
20 "net/http"
21
22 - "github.com/caddyserver/caddy"
22 + "github.com/caddyserver/caddy/v2"
23 )
24
25 // ServerRoute represents a set of matching rules,
modules/caddyhttp/server.go
+2 -2
@@ -23,8 +23,8 @@ import (
23 "strconv"
24 "strings"
25
26 - "github.com/caddyserver/caddy"
27 - "github.com/caddyserver/caddy/modules/caddytls"
26 + "github.com/caddyserver/caddy/v2"
27 + "github.com/caddyserver/caddy/v2/modules/caddytls"
28 )
29
30 // Server is an HTTP server.
modules/caddyhttp/staticresp.go
+1 -1
@@ -19,7 +19,7 @@ import (
19 "net/http"
20 "strconv"
21
22 - "github.com/caddyserver/caddy"
22 + "github.com/caddyserver/caddy/v2"
23 )
24
25 func init() {
modules/caddyhttp/staticresp_test.go
+1 -1
@@ -21,7 +21,7 @@ import (
21 "net/http/httptest"
22 "testing"
23
24 - "github.com/caddyserver/caddy"
24 + "github.com/caddyserver/caddy/v2"
25 )
26
27 func TestStaticResponseHandler(t *testing.T) {
modules/caddyhttp/table.go
+1 -1
@@ -17,7 +17,7 @@ package caddyhttp
17 import (
18 "net/http"
19
20 - "github.com/caddyserver/caddy"
20 + "github.com/caddyserver/caddy/v2"
21 )
22
23 func init() {
modules/caddyhttp/templates/templates.go
+2 -2
@@ -22,8 +22,8 @@ import (
22 "strconv"
23 "strings"
24
25 - "github.com/caddyserver/caddy"
26 - "github.com/caddyserver/caddy/modules/caddyhttp"
25 + "github.com/caddyserver/caddy/v2"
26 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
27 )
28
29 func init() {
modules/caddyhttp/templates/tplcontext.go
+1 -1
@@ -26,7 +26,7 @@ import (
26 "sync"
27
28 "github.com/Masterminds/sprig"
29 - "github.com/caddyserver/caddy/modules/caddyhttp"
29 + "github.com/caddyserver/caddy/v2/modules/caddyhttp"
30 "gopkg.in/russross/blackfriday.v2"
31 )
32
modules/caddytls/acmemanager.go
+1 -1
@@ -22,7 +22,7 @@ import (
22
23 "github.com/go-acme/lego/certcrypto"
24
25 - "github.com/caddyserver/caddy"
25 + "github.com/caddyserver/caddy/v2"
26 "github.com/go-acme/lego/challenge"
27 "github.com/mholt/certmagic"
28 )
modules/caddytls/connpolicy.go
+1 -1
@@ -21,7 +21,7 @@ import (
21 "fmt"
22 "strings"
23
24 - "github.com/caddyserver/caddy"
24 + "github.com/caddyserver/caddy/v2"
25 "github.com/go-acme/lego/challenge/tlsalpn01"
26 "github.com/mholt/certmagic"
27 )
modules/caddytls/fileloader.go
+1 -1
@@ -19,7 +19,7 @@ import (
19 "fmt"
20 "io/ioutil"
21
22 - "github.com/caddyserver/caddy"
22 + "github.com/caddyserver/caddy/v2"
23 )
24
25 func init() {
modules/caddytls/folderloader.go
+1 -1
@@ -24,7 +24,7 @@ import (
24 "path/filepath"
25 "strings"
26
27 - "github.com/caddyserver/caddy"
27 + "github.com/caddyserver/caddy/v2"
28 )
29
30 func init() {
modules/caddytls/matchers.go
+1 -1
@@ -17,7 +17,7 @@ package caddytls
17 import (
18 "crypto/tls"
19
20 - "github.com/caddyserver/caddy"
20 + "github.com/caddyserver/caddy/v2"
21 )
22
23 // MatchServerName matches based on SNI.
modules/caddytls/sessiontickets.go
+1 -1
@@ -23,7 +23,7 @@ import (
23 "sync"
24 "time"
25
26 - "github.com/caddyserver/caddy"
26 + "github.com/caddyserver/caddy/v2"
27 )
28
29 // SessionTicketService configures and manages TLS session tickets.
modules/caddytls/standardstek/stek.go
+2 -2
@@ -19,8 +19,8 @@ import (
19 "sync"
20 "time"
21
22 - "github.com/caddyserver/caddy"
23 - "github.com/caddyserver/caddy/modules/caddytls"
22 + "github.com/caddyserver/caddy/v2"
23 + "github.com/caddyserver/caddy/v2/modules/caddytls"
24 )
25
26 func init() {
modules/caddytls/tls.go
+1 -1
@@ -23,7 +23,7 @@ import (
23 "os"
24 "time"
25
26 - "github.com/caddyserver/caddy"
26 + "github.com/caddyserver/caddy/v2"
27 "github.com/go-acme/lego/challenge"
28 "github.com/mholt/certmagic"
29 "golang.org/x/time/rate"
modules/caddytls/values.go
+1 -1
@@ -69,7 +69,7 @@ var defaultCipherSuitesWithoutAESNI = []uint16{
69 // getOptimalDefaultCipherSuites returns an appropriate cipher
70 // suite to use depending on the hardware support for AES.
71 //
72 -// See https://github.com/mholt/caddy/issues/1674
72 +// See https://github.com/caddyserver/caddy/issues/1674
73 func getOptimalDefaultCipherSuites() []uint16 {
74 if cpuid.CPU.AesNi() {
75 return defaultCipherSuitesWithAESNI
pkg/caddyscript/matcherenv.go
+1 -1
@@ -17,7 +17,7 @@ package caddyscript
17 import (
18 "net/http"
19
20 - caddyscript "github.com/caddyserver/caddy/pkg/caddyscript/lib"
20 + caddyscript "github.com/caddyserver/caddy/v2/pkg/caddyscript/lib"
21 "go.starlark.net/starlark"
22 )
23