Skip to content

Commit 2f63f81

Browse files
Relocate internal packages and update imports
- Moved `pkg/internal/` to `internal/` to align with [Go's internal package conventions](https://go.dev/doc/modules/layout#package-or-command-with-supporting-packages). - Updated all relevant import paths to reflect the new package structure. - Adjusted `make/test-unit.mk` to include the new directory structure in test coverage. - Ensured all tests and mock data are updated to work with the new structure. Signed-off-by: Richard Wall <[email protected]>
1 parent 2d030d4 commit 2f63f81

27 files changed

+21
-21
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"net/http"
77
"os"
88

9-
"github.com/jetstack/preflight/pkg/internal/cyberark/dataupload"
10-
"github.com/jetstack/preflight/pkg/internal/cyberark/identity"
11-
"github.com/jetstack/preflight/pkg/internal/cyberark/servicediscovery"
9+
"github.com/jetstack/preflight/internal/cyberark/dataupload"
10+
"github.com/jetstack/preflight/internal/cyberark/identity"
11+
"github.com/jetstack/preflight/internal/cyberark/servicediscovery"
1212
)
1313

1414
// ClientConfig holds the configuration needed to initialize a CyberArk client.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
"k8s.io/klog/v2"
1212
"k8s.io/klog/v2/ktesting"
1313

14-
"github.com/jetstack/preflight/pkg/internal/cyberark"
15-
"github.com/jetstack/preflight/pkg/internal/cyberark/dataupload"
16-
"github.com/jetstack/preflight/pkg/internal/cyberark/servicediscovery"
14+
"github.com/jetstack/preflight/internal/cyberark"
15+
"github.com/jetstack/preflight/internal/cyberark/dataupload"
16+
"github.com/jetstack/preflight/internal/cyberark/servicediscovery"
1717
"github.com/jetstack/preflight/pkg/testutil"
1818
"github.com/jetstack/preflight/pkg/version"
1919

@@ -52,7 +52,7 @@ func TestCyberArkClient_PutSnapshot_MockAPI(t *testing.T) {
5252
//
5353
// To enable verbose request logging:
5454
//
55-
// go test ./pkg/internal/cyberark \
55+
// go test ./internal/cyberark \
5656
// -v -count 1 -run TestCyberArkClient_PutSnapshot_RealAPI -args -testing.v 6
5757
func TestCyberArkClient_PutSnapshot_RealAPI(t *testing.T) {
5858
logger := ktesting.NewLogger(t, ktesting.DefaultConfig)
File renamed without changes.

pkg/internal/cyberark/dataupload/dataupload_test.go renamed to internal/cyberark/dataupload/dataupload_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"k8s.io/klog/v2"
1010
"k8s.io/klog/v2/ktesting"
1111

12-
"github.com/jetstack/preflight/pkg/internal/cyberark/dataupload"
12+
"github.com/jetstack/preflight/internal/cyberark/dataupload"
1313

1414
_ "k8s.io/klog/v2/ktesting/init"
1515
)

pkg/internal/cyberark/identity/advance_authentication_test.go renamed to internal/cyberark/identity/advance_authentication_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"k8s.io/klog/v2"
88
"k8s.io/klog/v2/ktesting"
99

10-
"github.com/jetstack/preflight/pkg/internal/cyberark/servicediscovery"
10+
"github.com/jetstack/preflight/internal/cyberark/servicediscovery"
1111

1212
_ "k8s.io/klog/v2/ktesting/init"
1313
)

pkg/internal/cyberark/identity/authenticated_http_client.go renamed to internal/cyberark/identity/authenticated_http_client.go

File renamed without changes.

pkg/internal/cyberark/identity/cmd/testidentity/main.go renamed to internal/cyberark/identity/cmd/testidentity/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"k8s.io/client-go/transport"
1313
"k8s.io/klog/v2"
1414

15-
"github.com/jetstack/preflight/pkg/internal/cyberark/identity"
16-
"github.com/jetstack/preflight/pkg/internal/cyberark/servicediscovery"
15+
"github.com/jetstack/preflight/internal/cyberark/identity"
16+
"github.com/jetstack/preflight/internal/cyberark/servicediscovery"
1717
"github.com/jetstack/preflight/pkg/version"
1818
)
1919

File renamed without changes.

0 commit comments

Comments
 (0)