From 5843bc1768ac743e9113f8320f75aa6f9e2b97c6 Mon Sep 17 00:00:00 2001 From: "David J. Allen" Date: Thu, 20 Feb 2025 17:09:21 -0700 Subject: [PATCH] refactor: moved internal functions to pkg and updated refs --- cmd/collect.go | 2 +- cmd/scan.go | 2 +- cmd/update.go | 2 +- internal/cache/sqlite/sqlite.go | 2 +- {internal => pkg}/collect.go | 0 {internal => pkg}/scan.go | 0 {internal => pkg}/update.go | 0 tests/api_test.go | 2 +- 8 files changed, 5 insertions(+), 5 deletions(-) rename {internal => pkg}/collect.go (100%) rename {internal => pkg}/scan.go (100%) rename {internal => pkg}/update.go (100%) diff --git a/cmd/collect.go b/cmd/collect.go index a095b13..3e43499 100644 --- a/cmd/collect.go +++ b/cmd/collect.go @@ -4,9 +4,9 @@ import ( "fmt" "os/user" - magellan "github.com/OpenCHAMI/magellan/internal" "github.com/OpenCHAMI/magellan/internal/cache/sqlite" urlx "github.com/OpenCHAMI/magellan/internal/url" + magellan "github.com/OpenCHAMI/magellan/pkg" "github.com/OpenCHAMI/magellan/pkg/auth" "github.com/cznic/mathutil" "github.com/rs/zerolog/log" diff --git a/cmd/scan.go b/cmd/scan.go index 864449f..76955c0 100644 --- a/cmd/scan.go +++ b/cmd/scan.go @@ -7,8 +7,8 @@ import ( "os" "path" - magellan "github.com/OpenCHAMI/magellan/internal" "github.com/OpenCHAMI/magellan/internal/cache/sqlite" + magellan "github.com/OpenCHAMI/magellan/pkg" "github.com/rs/zerolog/log" urlx "github.com/OpenCHAMI/magellan/internal/url" diff --git a/cmd/update.go b/cmd/update.go index d5f9a50..e877fa4 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -4,7 +4,7 @@ import ( "os" "strings" - magellan "github.com/OpenCHAMI/magellan/internal" + magellan "github.com/OpenCHAMI/magellan/pkg" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" diff --git a/internal/cache/sqlite/sqlite.go b/internal/cache/sqlite/sqlite.go index 594fd92..a4e782a 100644 --- a/internal/cache/sqlite/sqlite.go +++ b/internal/cache/sqlite/sqlite.go @@ -3,8 +3,8 @@ package sqlite import ( "fmt" - magellan "github.com/OpenCHAMI/magellan/internal" "github.com/OpenCHAMI/magellan/internal/util" + magellan "github.com/OpenCHAMI/magellan/pkg" "github.com/jmoiron/sqlx" ) diff --git a/internal/collect.go b/pkg/collect.go similarity index 100% rename from internal/collect.go rename to pkg/collect.go diff --git a/internal/scan.go b/pkg/scan.go similarity index 100% rename from internal/scan.go rename to pkg/scan.go diff --git a/internal/update.go b/pkg/update.go similarity index 100% rename from internal/update.go rename to pkg/update.go diff --git a/tests/api_test.go b/tests/api_test.go index e823bfa..999f142 100644 --- a/tests/api_test.go +++ b/tests/api_test.go @@ -22,8 +22,8 @@ import ( "flag" - magellan "github.com/OpenCHAMI/magellan/internal" "github.com/OpenCHAMI/magellan/internal/util" + magellan "github.com/OpenCHAMI/magellan/pkg" "github.com/OpenCHAMI/magellan/pkg/client" "github.com/rs/zerolog/log" )