From ed0cdf6a6fce4b0bfffa5dc97843ccf5222e9c8c Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Tue, 18 Apr 2023 16:36:37 +0200 Subject: [PATCH] refactor: move config and cmd to internal They don't need to be exposed to the outside world --- {cmd => internal/cmd}/cli.go | 0 {cmd => internal/cmd}/cli_test.go | 2 +- {cmd => internal/cmd}/dig.go | 0 {cmd => internal/cmd}/dig_test.go | 2 +- {cmd => internal/cmd}/docs.go | 0 {cmd => internal/cmd}/misc.go | 2 +- {cmd => internal/cmd}/misc_test.go | 2 +- {conf => internal/conf}/docs.go | 0 {conf => internal/conf}/plan9.go | 0 {conf => internal/conf}/plan9_test.go | 2 +- {conf => internal/conf}/unix.go | 0 {conf => internal/conf}/unix_test.go | 2 +- {conf => internal/conf}/wasm.go | 0 {conf => internal/conf}/win.go | 0 {conf => internal/conf}/win_test.go | 2 +- main.go | 2 +- 16 files changed, 8 insertions(+), 8 deletions(-) rename {cmd => internal/cmd}/cli.go (100%) rename {cmd => internal/cmd}/cli_test.go (98%) rename {cmd => internal/cmd}/dig.go (100%) rename {cmd => internal/cmd}/dig_test.go (98%) rename {cmd => internal/cmd}/docs.go (100%) rename {cmd => internal/cmd}/misc.go (99%) rename {cmd => internal/cmd}/misc_test.go (99%) rename {conf => internal/conf}/docs.go (100%) rename {conf => internal/conf}/plan9.go (100%) rename {conf => internal/conf}/plan9_test.go (91%) rename {conf => internal/conf}/unix.go (100%) rename {conf => internal/conf}/unix_test.go (94%) rename {conf => internal/conf}/wasm.go (100%) rename {conf => internal/conf}/win.go (100%) rename {conf => internal/conf}/win_test.go (91%) diff --git a/cmd/cli.go b/internal/cmd/cli.go similarity index 100% rename from cmd/cli.go rename to internal/cmd/cli.go diff --git a/cmd/cli_test.go b/internal/cmd/cli_test.go similarity index 98% rename from cmd/cli_test.go rename to internal/cmd/cli_test.go index 741355b..4977236 100644 --- a/cmd/cli_test.go +++ b/internal/cmd/cli_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - cli "dns.froth.zone/awl/cmd" + cli "dns.froth.zone/awl/internal/cmd" "dns.froth.zone/awl/pkg/util" "gotest.tools/v3/assert" ) diff --git a/cmd/dig.go b/internal/cmd/dig.go similarity index 100% rename from cmd/dig.go rename to internal/cmd/dig.go diff --git a/cmd/dig_test.go b/internal/cmd/dig_test.go similarity index 98% rename from cmd/dig_test.go rename to internal/cmd/dig_test.go index b014e01..0ec5fa2 100644 --- a/cmd/dig_test.go +++ b/internal/cmd/dig_test.go @@ -5,7 +5,7 @@ package cli_test import ( "testing" - cli "dns.froth.zone/awl/cmd" + cli "dns.froth.zone/awl/internal/cmd" "dns.froth.zone/awl/pkg/util" "gotest.tools/v3/assert" ) diff --git a/cmd/docs.go b/internal/cmd/docs.go similarity index 100% rename from cmd/docs.go rename to internal/cmd/docs.go diff --git a/cmd/misc.go b/internal/cmd/misc.go similarity index 99% rename from cmd/misc.go rename to internal/cmd/misc.go index b2d18a3..e666841 100644 --- a/cmd/misc.go +++ b/internal/cmd/misc.go @@ -7,7 +7,7 @@ import ( "math/rand" "strings" - "dns.froth.zone/awl/conf" + "dns.froth.zone/awl/internal/conf" "dns.froth.zone/awl/pkg/util" "github.com/miekg/dns" "golang.org/x/net/idna" diff --git a/cmd/misc_test.go b/internal/cmd/misc_test.go similarity index 99% rename from cmd/misc_test.go rename to internal/cmd/misc_test.go index 9b7ee2a..0647eee 100644 --- a/cmd/misc_test.go +++ b/internal/cmd/misc_test.go @@ -5,7 +5,7 @@ package cli_test import ( "testing" - cli "dns.froth.zone/awl/cmd" + cli "dns.froth.zone/awl/internal/cmd" "dns.froth.zone/awl/pkg/util" "github.com/miekg/dns" "gotest.tools/v3/assert" diff --git a/conf/docs.go b/internal/conf/docs.go similarity index 100% rename from conf/docs.go rename to internal/conf/docs.go diff --git a/conf/plan9.go b/internal/conf/plan9.go similarity index 100% rename from conf/plan9.go rename to internal/conf/plan9.go diff --git a/conf/plan9_test.go b/internal/conf/plan9_test.go similarity index 91% rename from conf/plan9_test.go rename to internal/conf/plan9_test.go index 931d9a5..b019de4 100644 --- a/conf/plan9_test.go +++ b/internal/conf/plan9_test.go @@ -7,7 +7,7 @@ import ( "runtime" "testing" - "dns.froth.zone/awl/conf" + "dns.froth.zone/awl/internal/conf" "gotest.tools/v3/assert" ) diff --git a/conf/unix.go b/internal/conf/unix.go similarity index 100% rename from conf/unix.go rename to internal/conf/unix.go diff --git a/conf/unix_test.go b/internal/conf/unix_test.go similarity index 94% rename from conf/unix_test.go rename to internal/conf/unix_test.go index cfc17a3..862455e 100644 --- a/conf/unix_test.go +++ b/internal/conf/unix_test.go @@ -9,7 +9,7 @@ import ( "runtime" "testing" - "dns.froth.zone/awl/conf" + "dns.froth.zone/awl/internal/conf" "gotest.tools/v3/assert" ) diff --git a/conf/wasm.go b/internal/conf/wasm.go similarity index 100% rename from conf/wasm.go rename to internal/conf/wasm.go diff --git a/conf/win.go b/internal/conf/win.go similarity index 100% rename from conf/win.go rename to internal/conf/win.go diff --git a/conf/win_test.go b/internal/conf/win_test.go similarity index 91% rename from conf/win_test.go rename to internal/conf/win_test.go index 9e887dc..a93f9c7 100644 --- a/conf/win_test.go +++ b/internal/conf/win_test.go @@ -7,7 +7,7 @@ import ( "runtime" "testing" - "dns.froth.zone/awl/conf" + "dns.froth.zone/awl/internal/conf" "gotest.tools/v3/assert" ) diff --git a/main.go b/main.go index 194933b..629e506 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,7 @@ import ( "strings" "time" - cli "dns.froth.zone/awl/cmd" + cli "dns.froth.zone/awl/internal/cmd" "dns.froth.zone/awl/pkg/query" "dns.froth.zone/awl/pkg/util" "github.com/miekg/dns"