diff --git a/cmd/nuke.go b/cmd/nuke.go index 826bea4fb..9bb3062e3 100644 --- a/cmd/nuke.go +++ b/cmd/nuke.go @@ -5,6 +5,7 @@ import ( "time" "github.com/rebuy-de/aws-nuke/pkg/awsutil" + "github.com/rebuy-de/aws-nuke/pkg/config" "github.com/rebuy-de/aws-nuke/pkg/types" "github.com/rebuy-de/aws-nuke/resources" ) @@ -12,7 +13,7 @@ import ( type Nuke struct { Parameters NukeParameters Account awsutil.Account - Config *NukeConfig + Config *config.NukeConfig ResourceTypes types.Collection diff --git a/cmd/root.go b/cmd/root.go index acf966f4d..d4b05b098 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -5,6 +5,7 @@ import ( "sort" "github.com/rebuy-de/aws-nuke/pkg/awsutil" + "github.com/rebuy-de/aws-nuke/pkg/config" "github.com/rebuy-de/aws-nuke/resources" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" @@ -52,7 +53,7 @@ func NewRootCommand() *cobra.Command { n := NewNuke(params, *account) - n.Config, err = LoadConfig(n.Parameters.ConfigPath) + n.Config, err = config.LoadConfig(n.Parameters.ConfigPath) if err != nil { return err } diff --git a/cmd/config.go b/pkg/config/config.go similarity index 99% rename from cmd/config.go rename to pkg/config/config.go index b740f404b..3069d9ed1 100644 --- a/cmd/config.go +++ b/pkg/config/config.go @@ -1,4 +1,4 @@ -package cmd +package config import ( "fmt" diff --git a/cmd/config_test.go b/pkg/config/config_test.go similarity index 99% rename from cmd/config_test.go rename to pkg/config/config_test.go index 2d53b3f8f..4a3aaef63 100644 --- a/cmd/config_test.go +++ b/pkg/config/config_test.go @@ -1,4 +1,4 @@ -package cmd +package config import ( "fmt" diff --git a/cmd/test-fixtures/example.yaml b/pkg/config/test-fixtures/example.yaml similarity index 100% rename from cmd/test-fixtures/example.yaml rename to pkg/config/test-fixtures/example.yaml