Browse Source

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

See https://github.com/golang/go/wiki/Modules#semantic-import-versioning
master
Matthew Holt 6 years ago
parent
commit
fdd871e177
No known key found for this signature in database GPG Key ID: 2A349DD577D586A5
  1. 2
      caddy.go
  2. 30
      cmd/caddy/main.go
  3. 2
      cmd/commands.go
  4. 2
      go.mod
  5. 4
      modules/caddyhttp/caddyhttp.go
  6. 4
      modules/caddyhttp/caddylog/log.go
  7. 4
      modules/caddyhttp/encode/brotli/brotli.go
  8. 4
      modules/caddyhttp/encode/encode.go
  9. 4
      modules/caddyhttp/encode/gzip/gzip.go
  10. 4
      modules/caddyhttp/encode/zstd/zstd.go
  11. 2
      modules/caddyhttp/errors.go
  12. 4
      modules/caddyhttp/fileserver/browse.go
  13. 2
      modules/caddyhttp/fileserver/browselisting.go
  14. 4
      modules/caddyhttp/fileserver/matcher.go
  15. 4
      modules/caddyhttp/fileserver/staticfiles.go
  16. 4
      modules/caddyhttp/headers/headers.go
  17. 4
      modules/caddyhttp/markdown/markdown.go
  18. 4
      modules/caddyhttp/matchers.go
  19. 2
      modules/caddyhttp/matchers_test.go
  20. 2
      modules/caddyhttp/replacer.go
  21. 4
      modules/caddyhttp/requestbody/requestbody.go
  22. 2
      modules/caddyhttp/reverseproxy/module.go
  23. 2
      modules/caddyhttp/reverseproxy/upstream.go
  24. 4
      modules/caddyhttp/rewrite/rewrite.go
  25. 2
      modules/caddyhttp/routes.go
  26. 4
      modules/caddyhttp/server.go
  27. 2
      modules/caddyhttp/staticresp.go
  28. 2
      modules/caddyhttp/staticresp_test.go
  29. 2
      modules/caddyhttp/table.go
  30. 4
      modules/caddyhttp/templates/templates.go
  31. 2
      modules/caddyhttp/templates/tplcontext.go
  32. 2
      modules/caddytls/acmemanager.go
  33. 2
      modules/caddytls/connpolicy.go
  34. 2
      modules/caddytls/fileloader.go
  35. 2
      modules/caddytls/folderloader.go
  36. 2
      modules/caddytls/matchers.go
  37. 2
      modules/caddytls/sessiontickets.go
  38. 4
      modules/caddytls/standardstek/stek.go
  39. 2
      modules/caddytls/tls.go
  40. 2
      modules/caddytls/values.go
  41. 2
      pkg/caddyscript/matcherenv.go

2
caddy.go

@ -199,7 +199,7 @@ func GoModule() *debug.Module {
} }
// goModule is the name of this Go 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. // CtxKey is a value type for use with context.WithValue.
type CtxKey string type CtxKey string

30
cmd/caddy/main.go

@ -15,23 +15,23 @@
package main package main
import ( import (
caddycmd "github.com/caddyserver/caddy/cmd" caddycmd "github.com/caddyserver/caddy/v2/cmd"
// this is where modules get plugged in // this is where modules get plugged in
_ "github.com/caddyserver/caddy/modules/caddyhttp" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp"
_ "github.com/caddyserver/caddy/modules/caddyhttp/encode" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode"
_ "github.com/caddyserver/caddy/modules/caddyhttp/encode/brotli" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli"
_ "github.com/caddyserver/caddy/modules/caddyhttp/encode/gzip" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip"
_ "github.com/caddyserver/caddy/modules/caddyhttp/encode/zstd" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd"
_ "github.com/caddyserver/caddy/modules/caddyhttp/fileserver" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/fileserver"
_ "github.com/caddyserver/caddy/modules/caddyhttp/headers" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/headers"
_ "github.com/caddyserver/caddy/modules/caddyhttp/markdown" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/markdown"
_ "github.com/caddyserver/caddy/modules/caddyhttp/requestbody" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/requestbody"
_ "github.com/caddyserver/caddy/modules/caddyhttp/reverseproxy" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy"
_ "github.com/caddyserver/caddy/modules/caddyhttp/rewrite" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
_ "github.com/caddyserver/caddy/modules/caddyhttp/templates" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/templates"
_ "github.com/caddyserver/caddy/modules/caddytls" _ "github.com/caddyserver/caddy/v2/modules/caddytls"
_ "github.com/caddyserver/caddy/modules/caddytls/standardstek" _ "github.com/caddyserver/caddy/v2/modules/caddytls/standardstek"
) )
func main() { func main() {

2
cmd/commands.go

@ -26,7 +26,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/mholt/certmagic" "github.com/mholt/certmagic"
"github.com/mitchellh/go-ps" "github.com/mitchellh/go-ps"
) )

2
go.mod

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

4
modules/caddyhttp/caddyhttp.go

@ -26,8 +26,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddytls" "github.com/caddyserver/caddy/v2/modules/caddytls"
"github.com/mholt/certmagic" "github.com/mholt/certmagic"
) )

4
modules/caddyhttp/caddylog/log.go

@ -19,8 +19,8 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
) )
func init() { func init() {

4
modules/caddyhttp/encode/brotli/brotli.go

@ -18,8 +18,8 @@ import (
"fmt" "fmt"
"github.com/andybalholm/brotli" "github.com/andybalholm/brotli"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp/encode" "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode"
) )
func init() { func init() {

4
modules/caddyhttp/encode/encode.go

@ -30,8 +30,8 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
) )
func init() { func init() {

4
modules/caddyhttp/encode/gzip/gzip.go

@ -19,8 +19,8 @@ import (
"compress/gzip" // TODO: consider using https://github.com/klauspost/compress/gzip "compress/gzip" // TODO: consider using https://github.com/klauspost/compress/gzip
"fmt" "fmt"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp/encode" "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode"
) )
func init() { func init() {

4
modules/caddyhttp/encode/zstd/zstd.go

@ -15,8 +15,8 @@
package caddyzstd package caddyzstd
import ( import (
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp/encode" "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode"
"github.com/klauspost/compress/zstd" "github.com/klauspost/compress/zstd"
) )

2
modules/caddyhttp/errors.go

@ -21,7 +21,7 @@ import (
"runtime" "runtime"
"strings" "strings"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
) )
// Error is a convenient way for a Handler to populate the // Error is a convenient way for a Handler to populate the

4
modules/caddyhttp/fileserver/browse.go

@ -23,8 +23,8 @@ import (
"path" "path"
"strings" "strings"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
) )
// Browse configures directory browsing. // Browse configures directory browsing.

2
modules/caddyhttp/fileserver/browselisting.go

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

4
modules/caddyhttp/fileserver/matcher.go

@ -18,8 +18,8 @@ import (
"net/http" "net/http"
"os" "os"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
) )
func init() { func init() {

4
modules/caddyhttp/fileserver/staticfiles.go

@ -27,8 +27,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
) )
func init() { func init() {

4
modules/caddyhttp/headers/headers.go

@ -18,8 +18,8 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
) )
func init() { func init() {

4
modules/caddyhttp/markdown/markdown.go

@ -23,8 +23,8 @@ import (
"gopkg.in/russross/blackfriday.v2" "gopkg.in/russross/blackfriday.v2"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
) )
func init() { func init() {

4
modules/caddyhttp/matchers.go

@ -27,8 +27,8 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/pkg/caddyscript" "github.com/caddyserver/caddy/v2/pkg/caddyscript"
"go.starlark.net/starlark" "go.starlark.net/starlark"
) )

2
modules/caddyhttp/matchers_test.go

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

2
modules/caddyhttp/replacer.go

@ -21,7 +21,7 @@ import (
"path" "path"
"strings" "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 // TODO: A simple way to format or escape or encode each value would be nice

4
modules/caddyhttp/requestbody/requestbody.go

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

2
modules/caddyhttp/reverseproxy/module.go

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

2
modules/caddyhttp/reverseproxy/upstream.go

@ -28,7 +28,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
) )
// CircuitBreaker defines the functionality of a circuit breaker module. // CircuitBreaker defines the functionality of a circuit breaker module.

4
modules/caddyhttp/rewrite/rewrite.go

@ -19,8 +19,8 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
) )
func init() { func init() {

2
modules/caddyhttp/routes.go

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

4
modules/caddyhttp/server.go

@ -23,8 +23,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddytls" "github.com/caddyserver/caddy/v2/modules/caddytls"
) )
// Server is an HTTP server. // Server is an HTTP server.

2
modules/caddyhttp/staticresp.go

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

2
modules/caddyhttp/staticresp_test.go

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

2
modules/caddyhttp/table.go

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

4
modules/caddyhttp/templates/templates.go

@ -22,8 +22,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
) )
func init() { func init() {

2
modules/caddyhttp/templates/tplcontext.go

@ -26,7 +26,7 @@ import (
"sync" "sync"
"github.com/Masterminds/sprig" "github.com/Masterminds/sprig"
"github.com/caddyserver/caddy/modules/caddyhttp" "github.com/caddyserver/caddy/v2/modules/caddyhttp"
"gopkg.in/russross/blackfriday.v2" "gopkg.in/russross/blackfriday.v2"
) )

2
modules/caddytls/acmemanager.go

@ -22,7 +22,7 @@ import (
"github.com/go-acme/lego/certcrypto" "github.com/go-acme/lego/certcrypto"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/go-acme/lego/challenge" "github.com/go-acme/lego/challenge"
"github.com/mholt/certmagic" "github.com/mholt/certmagic"
) )

2
modules/caddytls/connpolicy.go

@ -21,7 +21,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/go-acme/lego/challenge/tlsalpn01" "github.com/go-acme/lego/challenge/tlsalpn01"
"github.com/mholt/certmagic" "github.com/mholt/certmagic"
) )

2
modules/caddytls/fileloader.go

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

2
modules/caddytls/folderloader.go

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

2
modules/caddytls/matchers.go

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

2
modules/caddytls/sessiontickets.go

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

4
modules/caddytls/standardstek/stek.go

@ -19,8 +19,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/modules/caddytls" "github.com/caddyserver/caddy/v2/modules/caddytls"
) )
func init() { func init() {

2
modules/caddytls/tls.go

@ -23,7 +23,7 @@ import (
"os" "os"
"time" "time"
"github.com/caddyserver/caddy" "github.com/caddyserver/caddy/v2"
"github.com/go-acme/lego/challenge" "github.com/go-acme/lego/challenge"
"github.com/mholt/certmagic" "github.com/mholt/certmagic"
"golang.org/x/time/rate" "golang.org/x/time/rate"

2
modules/caddytls/values.go

@ -69,7 +69,7 @@ var defaultCipherSuitesWithoutAESNI = []uint16{
// getOptimalDefaultCipherSuites returns an appropriate cipher // getOptimalDefaultCipherSuites returns an appropriate cipher
// suite to use depending on the hardware support for AES. // 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 { func getOptimalDefaultCipherSuites() []uint16 {
if cpuid.CPU.AesNi() { if cpuid.CPU.AesNi() {
return defaultCipherSuitesWithAESNI return defaultCipherSuitesWithAESNI

2
pkg/caddyscript/matcherenv.go

@ -17,7 +17,7 @@ package caddyscript
import ( import (
"net/http" "net/http"
caddyscript "github.com/caddyserver/caddy/pkg/caddyscript/lib" caddyscript "github.com/caddyserver/caddy/v2/pkg/caddyscript/lib"
"go.starlark.net/starlark" "go.starlark.net/starlark"
) )

Loading…
Cancel
Save