Skip to content

Commit

Permalink
fix: make all packages internal (#17)
Browse files Browse the repository at this point in the history
Packages below `pkg/` (actually any dir except `internal/`) can be
used as a library by any external third-party project. By moving all
packages below `internal/` we don't need to be concerned about API
stability guarantees that we would need to give at one point if we left
those packages public.

In general I'd suggest to make all new code internal and only move it
into `pkg/` if we decide to provide parts of `sops-check` as a
libary with proper API stability guarantees towards the users.
  • Loading branch information
martinohmann authored Nov 29, 2024
1 parent be644ed commit 7352024
Show file tree
Hide file tree
Showing 16 changed files with 5 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/rules/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"regexp"

"github.com/Bonial-International-GmbH/sops-check/pkg/config"
"github.com/Bonial-International-GmbH/sops-check/internal/config"
)

// Compile takes a slice of rule configurations and compiles it into a single
Expand Down
2 changes: 1 addition & 1 deletion internal/rules/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"testing"

"github.com/Bonial-International-GmbH/sops-check/internal/config"
"github.com/Bonial-International-GmbH/sops-check/internal/rules"
"github.com/Bonial-International-GmbH/sops-check/pkg/config"
"github.com/goccy/go-yaml"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"strings"

"github.com/Bonial-International-GmbH/sops-check/internal/cli"
"github.com/Bonial-International-GmbH/sops-check/internal/config"
"github.com/Bonial-International-GmbH/sops-check/internal/rules"
"github.com/Bonial-International-GmbH/sops-check/internal/sops"
"github.com/Bonial-International-GmbH/sops-check/internal/stringutils"
"github.com/Bonial-International-GmbH/sops-check/pkg/config"
"github.com/Bonial-International-GmbH/sops-check/pkg/sops"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/Bonial-International-GmbH/sops-check/pkg/config"
"github.com/Bonial-International-GmbH/sops-check/internal/config"
"github.com/goccy/go-yaml"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down

0 comments on commit 7352024

Please sign in to comment.