diff --git a/.golangci.yml b/.golangci.yml index dab57df..16647d1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -102,12 +102,22 @@ issues: max-same-issues: 0 formatters: enable: + - gci - gofmt - gofumpt - golines settings: + gci: + custom-order: true + sections: + - standard + - prefix(github.com/appleboy/CodeGPT) + - default gofumpt: - extra-rules: true + extra: + group-params: true + clothe-returns: true + balance-calls: true exclusions: generated: lax run: diff --git a/cmd/hepler.go b/cmd/hepler.go index 2fb741e..7ac8c17 100644 --- a/cmd/hepler.go +++ b/cmd/hepler.go @@ -9,6 +9,7 @@ import ( "github.com/appleboy/CodeGPT/prompt" "github.com/appleboy/CodeGPT/provider/openai" "github.com/appleboy/CodeGPT/util" + "github.com/appleboy/com/file" "github.com/spf13/viper" ) diff --git a/cmd/prompt.go b/cmd/prompt.go index 6d61e1f..d810b55 100644 --- a/cmd/prompt.go +++ b/cmd/prompt.go @@ -5,6 +5,7 @@ import ( "path" "github.com/appleboy/CodeGPT/prompt" + "github.com/erikgeiser/promptkit/confirmation" "github.com/fatih/color" "github.com/spf13/cobra" diff --git a/git/git.go b/git/git.go index 520d0f6..7ce9890 100644 --- a/git/git.go +++ b/git/git.go @@ -10,6 +10,7 @@ import ( "strings" "github.com/appleboy/CodeGPT/util" + "github.com/appleboy/com/file" ) diff --git a/provider/openai/options_test.go b/provider/openai/options_test.go index 2818a5f..60ead69 100644 --- a/provider/openai/options_test.go +++ b/provider/openai/options_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/appleboy/CodeGPT/core" + openai "github.com/sashabaranov/go-openai" )