Skip to content

Commit

Permalink
refactor: diff module (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
byashimov authored Oct 30, 2024
1 parent 2010fde commit 269ea24
Show file tree
Hide file tree
Showing 10 changed files with 243 additions and 413 deletions.
2 changes: 0 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ linters:
- nakedret
- nestif
- nilerr
- nlreturn
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unused
- whitespace
- wsl

linters-settings:
gocognit:
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func run(cmd *cobra.Command, _ []string) {

logger.Info.Println("diffing")

dr, err := diff.Run(ctx, logger, gr, rr)
dr, err := diff.Run(rr, gr)
if err != nil {
logger.Error.Fatalf("error diffing: %s", err)
}
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ require (
github.com/mitchellh/copystructure v1.2.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8
golang.org/x/net v0.30.0
golang.org/x/sync v0.8.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
)
2 changes: 1 addition & 1 deletion internal/convert/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func TestUserConfigSchema(t *testing.T) {
}

if !cmp.Equal(got, tt.want) {
t.Errorf(cmp.Diff(tt.want, got))
t.Error(cmp.Diff(tt.want, got))
}
})
}
Expand Down
Loading

0 comments on commit 269ea24

Please sign in to comment.