Skip to content

Commit

Permalink
move config into separate package
Browse files Browse the repository at this point in the history
  • Loading branch information
svenwltr committed Mar 22, 2018
1 parent 9c0b33e commit 569d5aa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cmd/nuke.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ 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"
)

type Nuke struct {
Parameters NukeParameters
Account awsutil.Account
Config *NukeConfig
Config *config.NukeConfig

ResourceTypes types.Collection

Expand Down
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/config.go → pkg/config/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package config

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cmd/config_test.go → pkg/config/config_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package config

import (
"fmt"
Expand Down
File renamed without changes.

0 comments on commit 569d5aa

Please sign in to comment.