diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/pull_request_template.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/pull_request_template.md diff --git a/src/core/cmdline.go b/internal/core/cmdline.go similarity index 98% rename from src/core/cmdline.go rename to internal/core/cmdline.go index 0e2f634..240cee1 100644 --- a/src/core/cmdline.go +++ b/internal/core/cmdline.go @@ -10,7 +10,7 @@ package core import ( "fmt" - "github.com/aacebedo/dnsdock/src/utils" + "github.com/aacebedo/dnsdock/internal/utils" "gopkg.in/alecthomas/kingpin.v2" "strconv" ) diff --git a/src/core/docker.go b/internal/core/docker.go similarity index 98% rename from src/core/docker.go rename to internal/core/docker.go index 606e590..9af42ab 100644 --- a/src/core/docker.go +++ b/internal/core/docker.go @@ -11,8 +11,8 @@ package core import ( "crypto/tls" "errors" - "github.com/aacebedo/dnsdock/src/servers" - "github.com/aacebedo/dnsdock/src/utils" + "github.com/aacebedo/dnsdock/internal/servers" + "github.com/aacebedo/dnsdock/internal/utils" "github.com/docker/engine-api/client" "github.com/docker/engine-api/types" eventtypes "github.com/docker/engine-api/types/events" diff --git a/src/core/docker_test.go b/internal/core/docker_test.go similarity index 98% rename from src/core/docker_test.go rename to internal/core/docker_test.go index f624b65..f575878 100644 --- a/src/core/docker_test.go +++ b/internal/core/docker_test.go @@ -9,7 +9,7 @@ package core import ( - "github.com/aacebedo/dnsdock/src/servers" + "github.com/aacebedo/dnsdock/internal/servers" "reflect" "testing" ) diff --git a/src/core/loggers.go b/internal/core/loggers.go similarity index 100% rename from src/core/loggers.go rename to internal/core/loggers.go diff --git a/src/servers/dnsserver.go b/internal/servers/dnsserver.go similarity index 99% rename from src/servers/dnsserver.go rename to internal/servers/dnsserver.go index 03a0437..d309617 100644 --- a/src/servers/dnsserver.go +++ b/internal/servers/dnsserver.go @@ -11,7 +11,7 @@ package servers import ( "errors" "fmt" - "github.com/aacebedo/dnsdock/src/utils" + "github.com/aacebedo/dnsdock/internal/utils" "github.com/miekg/dns" "net" "regexp" diff --git a/src/servers/dnsserver_test.go b/internal/servers/dnsserver_test.go similarity index 99% rename from src/servers/dnsserver_test.go rename to internal/servers/dnsserver_test.go index 2ec748a..37d90cf 100644 --- a/src/servers/dnsserver_test.go +++ b/internal/servers/dnsserver_test.go @@ -9,7 +9,7 @@ package servers import ( - "github.com/aacebedo/dnsdock/src/utils" + "github.com/aacebedo/dnsdock/internal/utils" "github.com/miekg/dns" "net" "strings" diff --git a/src/servers/http.go b/internal/servers/http.go similarity index 99% rename from src/servers/http.go rename to internal/servers/http.go index 14ff203..5acb262 100644 --- a/src/servers/http.go +++ b/internal/servers/http.go @@ -10,7 +10,7 @@ package servers import ( "encoding/json" - "github.com/aacebedo/dnsdock/src/utils" + "github.com/aacebedo/dnsdock/internal/utils" "github.com/gorilla/mux" "net/http" ) diff --git a/src/servers/http_test.go b/internal/servers/http_test.go similarity index 96% rename from src/servers/http_test.go rename to internal/servers/http_test.go index 97a44b3..0469791 100644 --- a/src/servers/http_test.go +++ b/internal/servers/http_test.go @@ -9,8 +9,8 @@ package servers import ( - "github.com/aacebedo/dnsdock/src/utils" - "io/ioutil" + "github.com/aacebedo/dnsdock/internal/utils" + "io" "net/http" "strings" "testing" @@ -66,7 +66,7 @@ func TestServiceRequests(t *testing.T) { continue } - actual, err := ioutil.ReadAll(resp.Body) + actual, err := io.ReadAll(resp.Body) if err != nil { t.Error(err) } diff --git a/src/servers/loggers.go b/internal/servers/loggers.go similarity index 100% rename from src/servers/loggers.go rename to internal/servers/loggers.go diff --git a/src/utils/config.go b/internal/utils/config.go similarity index 100% rename from src/utils/config.go rename to internal/utils/config.go diff --git a/src/utils/config_test.go b/internal/utils/config_test.go similarity index 100% rename from src/utils/config_test.go rename to internal/utils/config_test.go diff --git a/src/utils/loggers.go b/internal/utils/loggers.go similarity index 92% rename from src/utils/loggers.go rename to internal/utils/loggers.go index 357345a..58d08c4 100644 --- a/src/utils/loggers.go +++ b/internal/utils/loggers.go @@ -10,7 +10,7 @@ package utils import ( "github.com/op/go-logging" - "io/ioutil" + "io" "os" ) @@ -22,7 +22,7 @@ func InitLoggers(verbosity int) (err error) { switch { case verbosity == 0: - backend = logging.NewLogBackend(ioutil.Discard, "", 0) + backend = logging.NewLogBackend(io.Discard, "", 0) case verbosity >= 1: backend = logging.NewLogBackend(os.Stdout, "", 0) } diff --git a/src/main.go b/main.go similarity index 91% rename from src/main.go rename to main.go index 538d887..3d0e81c 100644 --- a/src/main.go +++ b/main.go @@ -11,15 +11,15 @@ package main import ( "crypto/tls" "crypto/x509" - "github.com/aacebedo/dnsdock/src/core" - "github.com/aacebedo/dnsdock/src/servers" - "github.com/aacebedo/dnsdock/src/utils" + "github.com/aacebedo/dnsdock/internal/core" + "github.com/aacebedo/dnsdock/internal/servers" + "github.com/aacebedo/dnsdock/internal/utils" "github.com/op/go-logging" "io/ioutil" "os" ) // GitSummary contains the version number -var GitSummary string +var GitSummary string var logger = logging.MustGetLogger("dnsdock.main") func main() {