Skip to content

Commit

Permalink
chore: rename ecg package to pkg
Browse files Browse the repository at this point in the history
Signed-off-by: Bradley Jones <bradley.jones@anchore.com>
  • Loading branch information
bradleyjones committed Mar 7, 2023
1 parent 5d6299f commit c23a108
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/anchore/anchore-ecs-inventory/ecg"
"github.com/anchore/anchore-ecs-inventory/internal/config"
"github.com/anchore/anchore-ecs-inventory/internal/logger"
"github.com/anchore/anchore-ecs-inventory/pkg"
)

var (
Expand Down Expand Up @@ -61,7 +61,7 @@ func initLogging() {

logger.InitLogger(logConfig)
log = logger.Log
ecg.SetLogger(logger.Log)
pkg.SetLogger(logger.Log)
}

func logAppConfig() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/anchore/anchore-ecs-inventory/ecg"
"github.com/anchore/anchore-ecs-inventory/internal/config"
"github.com/anchore/anchore-ecs-inventory/pkg"
)

// rootCmd represents the base command when called without any subcommands
Expand Down Expand Up @@ -43,7 +43,7 @@ var rootCmd = &cobra.Command{
}
*/

ecg.PeriodicallyGetInventoryReport(appConfig.PollingIntervalSeconds, appConfig.AnchoreDetails, appConfig.Region)
pkg.PeriodicallyGetInventoryReport(appConfig.PollingIntervalSeconds, appConfig.AnchoreDetails, appConfig.Region)
},
}

Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"github.com/spf13/viper"
"gopkg.in/yaml.v2"

"github.com/anchore/anchore-ecs-inventory/ecg/connection"
"github.com/anchore/anchore-ecs-inventory/internal"
"github.com/anchore/anchore-ecs-inventory/pkg/connection"
)

const redacted = "******"
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"

"github.com/anchore/anchore-ecs-inventory/ecg/connection"
"github.com/anchore/anchore-ecs-inventory/pkg/connection"
)

func TestLoadConfigFromFileCliConfigPath(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions ecg/lib.go → pkg/lib.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package ecg
package pkg

import (
"encoding/json"
"fmt"
"os"
"time"

"github.com/anchore/anchore-ecs-inventory/ecg/connection"
"github.com/anchore/anchore-ecs-inventory/ecg/inventory"
"github.com/anchore/anchore-ecs-inventory/ecg/logger"
"github.com/anchore/anchore-ecs-inventory/ecg/reporter"
"github.com/anchore/anchore-ecs-inventory/pkg/connection"
"github.com/anchore/anchore-ecs-inventory/pkg/inventory"
"github.com/anchore/anchore-ecs-inventory/pkg/logger"
"github.com/anchore/anchore-ecs-inventory/pkg/reporter"
)

var log logger.Logger
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions ecg/reporter/reporter.go → pkg/reporter/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"net/url"
"time"

"github.com/anchore/anchore-ecs-inventory/ecg/connection"
"github.com/anchore/anchore-ecs-inventory/ecg/inventory"
"github.com/anchore/anchore-ecs-inventory/internal/logger"
"github.com/anchore/anchore-ecs-inventory/pkg/connection"
"github.com/anchore/anchore-ecs-inventory/pkg/inventory"
)

const ReportAPIPath = "v1/enterprise/inventories"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package reporter
import (
"testing"

"github.com/anchore/anchore-ecs-inventory/ecg/connection"
"github.com/anchore/anchore-ecs-inventory/pkg/connection"
)

func TestBuildUrl(t *testing.T) {
Expand Down

0 comments on commit c23a108

Please sign in to comment.