Change import paths to GitHub package names

This commit is contained in:
Matthew Holt 2019-06-04 13:52:37 -06:00
parent 39db06d9c4
commit 613aecb898
32 changed files with 63 additions and 62 deletions

View file

@ -1,19 +1,19 @@
package main package main
import ( import (
caddycmd "bitbucket.org/lightcodelabs/caddy2/cmd" caddycmd "github.com/caddyserver/caddy2/cmd"
// this is where modules get plugged in // this is where modules get plugged in
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" _ "github.com/caddyserver/caddy2/modules/caddyhttp"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/caddylog" _ "github.com/caddyserver/caddy2/modules/caddyhttp/caddylog"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/fileserver" _ "github.com/caddyserver/caddy2/modules/caddyhttp/fileserver"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/headers" _ "github.com/caddyserver/caddy2/modules/caddyhttp/headers"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/markdown" _ "github.com/caddyserver/caddy2/modules/caddyhttp/markdown"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/requestbody" _ "github.com/caddyserver/caddy2/modules/caddyhttp/requestbody"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/reverseproxy" _ "github.com/caddyserver/caddy2/modules/caddyhttp/reverseproxy"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/rewrite" _ "github.com/caddyserver/caddy2/modules/caddyhttp/rewrite"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddytls" _ "github.com/caddyserver/caddy2/modules/caddytls"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddytls/standardstek" _ "github.com/caddyserver/caddy2/modules/caddytls/standardstek"
) )
func main() { func main() {

View file

@ -4,7 +4,7 @@ import (
"flag" "flag"
"log" "log"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
// Main executes the main function of the caddy command. // Main executes the main function of the caddy command.

2
go.mod
View file

@ -1,4 +1,4 @@
module bitbucket.org/lightcodelabs/caddy2 module github.com/caddyserver/caddy2
go 1.12 go 1.12

View file

@ -12,8 +12,8 @@ import (
"strings" "strings"
"time" "time"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddytls" "github.com/caddyserver/caddy2/modules/caddytls"
"github.com/mholt/certmagic" "github.com/mholt/certmagic"
) )

View file

@ -5,8 +5,8 @@ import (
"net/http" "net/http"
"time" "time"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" "github.com/caddyserver/caddy2/modules/caddyhttp"
) )
func init() { func init() {

View file

@ -7,7 +7,7 @@ import (
"runtime" "runtime"
"strings" "strings"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
// Error is a convenient way for a Handler to populate the // Error is a convenient way for a Handler to populate the

View file

@ -9,8 +9,8 @@ import (
"path" "path"
"strings" "strings"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" "github.com/caddyserver/caddy2/modules/caddyhttp"
) )
// Browse configures directory browsing. // Browse configures directory browsing.

View file

@ -9,7 +9,7 @@ import (
"strings" "strings"
"time" "time"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"github.com/dustin/go-humanize" "github.com/dustin/go-humanize"
) )

View file

@ -4,8 +4,8 @@ import (
"net/http" "net/http"
"os" "os"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" "github.com/caddyserver/caddy2/modules/caddyhttp"
) )
func init() { func init() {

View file

@ -12,8 +12,8 @@ import (
"strings" "strings"
"time" "time"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" "github.com/caddyserver/caddy2/modules/caddyhttp"
) )
func init() { func init() {

View file

@ -4,8 +4,8 @@ import (
"net/http" "net/http"
"strings" "strings"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" "github.com/caddyserver/caddy2/modules/caddyhttp"
) )
func init() { func init() {

View file

@ -6,8 +6,8 @@ import (
"gopkg.in/russross/blackfriday.v2" "gopkg.in/russross/blackfriday.v2"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" "github.com/caddyserver/caddy2/modules/caddyhttp"
) )
func init() { func init() {

View file

@ -13,8 +13,8 @@ import (
"regexp" "regexp"
"strings" "strings"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/pkg/caddyscript" "github.com/caddyserver/caddy2/pkg/caddyscript"
"go.starlark.net/starlark" "go.starlark.net/starlark"
) )

View file

@ -8,7 +8,7 @@ import (
"net/url" "net/url"
"testing" "testing"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
func TestHostMatcher(t *testing.T) { func TestHostMatcher(t *testing.T) {

View file

@ -7,7 +7,7 @@ import (
"path" "path"
"strings" "strings"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
// 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

View file

@ -3,8 +3,8 @@ package requestbody
import ( import (
"net/http" "net/http"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" "github.com/caddyserver/caddy2/modules/caddyhttp"
) )
func init() { func init() {

View file

@ -1,7 +1,7 @@
package reverseproxy package reverseproxy
import ( import (
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
// Register caddy module. // Register caddy module.

View file

@ -14,7 +14,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
// CircuitBreaker defines the functionality of a circuit breaker module. // CircuitBreaker defines the functionality of a circuit breaker module.

View file

@ -5,8 +5,8 @@ import (
"net/url" "net/url"
"strings" "strings"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" "github.com/caddyserver/caddy2/modules/caddyhttp"
) )
func init() { func init() {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
// ServerRoute represents a set of matching rules, // ServerRoute represents a set of matching rules,

View file

@ -8,20 +8,21 @@ import (
"net/http" "net/http"
"strconv" "strconv"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddytls" "github.com/caddyserver/caddy2/modules/caddytls"
) )
// Server is an HTTP server. // Server is an HTTP server.
type Server struct { type Server struct {
Listen []string `json:"listen,omitempty"` Listen []string `json:"listen,omitempty"`
ReadTimeout caddy2.Duration `json:"read_timeout,omitempty"` ReadTimeout caddy2.Duration `json:"read_timeout,omitempty"`
ReadHeaderTimeout caddy2.Duration `json:"read_header_timeout,omitempty"` ReadHeaderTimeout caddy2.Duration `json:"read_header_timeout,omitempty"`
WriteTimeout caddy2.Duration `json:"write_timeout,omitempty"` WriteTimeout caddy2.Duration `json:"write_timeout,omitempty"`
IdleTimeout caddy2.Duration `json:"idle_timeout,omitempty"` IdleTimeout caddy2.Duration `json:"idle_timeout,omitempty"`
MaxHeaderBytes int `json:"max_header_bytes,omitempty"` MaxHeaderBytes int `json:"max_header_bytes,omitempty"`
Routes RouteList `json:"routes,omitempty"` Routes RouteList `json:"routes,omitempty"`
Errors *httpErrorConfig `json:"errors,omitempty"` Errors *httpErrorConfig `json:"errors,omitempty"`
// TODO: Having a separate connection policy to act as a default or template would be handy... then override using first matching conn policy...
TLSConnPolicies caddytls.ConnectionPolicies `json:"tls_connection_policies,omitempty"` TLSConnPolicies caddytls.ConnectionPolicies `json:"tls_connection_policies,omitempty"`
DisableAutoHTTPS bool `json:"disable_auto_https,omitempty"` DisableAutoHTTPS bool `json:"disable_auto_https,omitempty"`
DisableAutoHTTPSRedir bool `json:"disable_auto_https_redir,omitempty"` DisableAutoHTTPSRedir bool `json:"disable_auto_https_redir,omitempty"`

View file

@ -5,7 +5,7 @@ import (
"net/http" "net/http"
"strconv" "strconv"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
func init() { func init() {

View file

@ -3,7 +3,7 @@ package caddyhttp
import ( import (
"net/http" "net/http"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
func init() { func init() {

View file

@ -7,7 +7,7 @@ import (
"github.com/go-acme/lego/certcrypto" "github.com/go-acme/lego/certcrypto"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"github.com/go-acme/lego/challenge" "github.com/go-acme/lego/challenge"
"github.com/mholt/certmagic" "github.com/mholt/certmagic"
) )

View file

@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"github.com/go-acme/lego/challenge/tlsalpn01" "github.com/go-acme/lego/challenge/tlsalpn01"
"github.com/mholt/certmagic" "github.com/mholt/certmagic"
) )

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
func init() { func init() {

View file

@ -10,7 +10,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
func init() { func init() {

View file

@ -3,7 +3,7 @@ package caddytls
import ( import (
"crypto/tls" "crypto/tls"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
// MatchServerName matches based on SNI. // MatchServerName matches based on SNI.

View file

@ -9,7 +9,7 @@ import (
"sync" "sync"
"time" "time"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
) )
// SessionTicketService configures and manages TLS session tickets. // SessionTicketService configures and manages TLS session tickets.

View file

@ -5,8 +5,8 @@ import (
"sync" "sync"
"time" "time"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"bitbucket.org/lightcodelabs/caddy2/modules/caddytls" "github.com/caddyserver/caddy2/modules/caddytls"
) )
func init() { func init() {

View file

@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"bitbucket.org/lightcodelabs/caddy2" "github.com/caddyserver/caddy2"
"github.com/go-acme/lego/challenge" "github.com/go-acme/lego/challenge"
"github.com/mholt/certmagic" "github.com/mholt/certmagic"
) )

View file

@ -3,7 +3,7 @@ package caddyscript
import ( import (
"net/http" "net/http"
caddyscript "bitbucket.org/lightcodelabs/caddy2/pkg/caddyscript/lib" caddyscript "github.com/caddyserver/caddy2/pkg/caddyscript/lib"
"go.starlark.net/starlark" "go.starlark.net/starlark"
) )