mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 09:40:13 +08:00
go.mod: Append /v2 to module name; update all import paths
See https://github.com/golang/go/wiki/Modules#semantic-import-versioning
This commit is contained in:
parent
94c28a2574
commit
fdd871e177
2
caddy.go
2
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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module github.com/caddyserver/caddy
|
||||
module github.com/caddyserver/caddy/v2
|
||||
|
||||
go 1.12
|
||||
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
"github.com/dustin/go-humanize"
|
||||
)
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
"net/url"
|
||||
"testing"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
func TestHostMatcher(t *testing.T) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
package reverseproxy
|
||||
|
||||
import (
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
// Register caddy module.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
// ServerRoute represents a set of matching rules,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
func TestStaticResponseHandler(t *testing.T) {
|
||||
|
|
|
@ -17,7 +17,7 @@ package caddyhttp
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
"fmt"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -17,7 +17,7 @@ package caddytls
|
|||
import (
|
||||
"crypto/tls"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
// MatchServerName matches based on SNI.
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
// SessionTicketService configures and manages TLS session tickets.
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user