1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05: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:
Matthew Holt 2019-07-02 12:37:06 -06:00
parent 94c28a2574
commit fdd871e177
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
41 changed files with 72 additions and 72 deletions

View file

@ -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

View file

@ -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() {

View file

@ -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
View file

@ -1,4 +1,4 @@
module github.com/caddyserver/caddy
module github.com/caddyserver/caddy/v2
go 1.12

View file

@ -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"
)

View file

@ -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() {

View file

@ -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() {

View file

@ -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() {

View file

@ -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() {

View file

@ -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"
)

View file

@ -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

View file

@ -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.

View file

@ -23,7 +23,7 @@ import (
"strings"
"time"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
"github.com/dustin/go-humanize"
)

View file

@ -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() {

View file

@ -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() {

View file

@ -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() {

View file

@ -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() {

View file

@ -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"
)

View file

@ -22,7 +22,7 @@ import (
"net/url"
"testing"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
func TestHostMatcher(t *testing.T) {

View file

@ -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

View file

@ -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() {

View file

@ -15,7 +15,7 @@
package reverseproxy
import (
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
// Register caddy module.

View file

@ -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.

View file

@ -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() {

View file

@ -19,7 +19,7 @@ import (
"fmt"
"net/http"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
// ServerRoute represents a set of matching rules,

View file

@ -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.

View file

@ -19,7 +19,7 @@ import (
"net/http"
"strconv"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
func init() {

View file

@ -21,7 +21,7 @@ import (
"net/http/httptest"
"testing"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
func TestStaticResponseHandler(t *testing.T) {

View file

@ -17,7 +17,7 @@ package caddyhttp
import (
"net/http"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
func init() {

View file

@ -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() {

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -19,7 +19,7 @@ import (
"fmt"
"io/ioutil"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
func init() {

View file

@ -24,7 +24,7 @@ import (
"path/filepath"
"strings"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
func init() {

View file

@ -17,7 +17,7 @@ package caddytls
import (
"crypto/tls"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
// MatchServerName matches based on SNI.

View file

@ -23,7 +23,7 @@ import (
"sync"
"time"
"github.com/caddyserver/caddy"
"github.com/caddyserver/caddy/v2"
)
// SessionTicketService configures and manages TLS session tickets.

View file

@ -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() {

View file

@ -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"

View file

@ -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

View file

@ -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"
)