diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 00000000..1ed0475f --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,13 @@ + +linters: + enable: + # default linters + - errcheck + - gosimple + - govet + - ineffassign + - staticcheck + - typecheck + - unused + + - gofmt diff --git a/cmd/harbor/root/health.go b/cmd/harbor/root/health.go index 9baf4dfa..eae8257c 100644 --- a/cmd/harbor/root/health.go +++ b/cmd/harbor/root/health.go @@ -2,8 +2,8 @@ package root import ( "github.com/goharbor/harbor-cli/pkg/api" - "github.com/spf13/cobra" "github.com/goharbor/harbor-cli/pkg/views/health" + "github.com/spf13/cobra" ) func HealthCommand() *cobra.Command { diff --git a/pkg/api/health_handler.go b/pkg/api/health_handler.go index d8eceb37..ac21531b 100644 --- a/pkg/api/health_handler.go +++ b/pkg/api/health_handler.go @@ -13,7 +13,7 @@ func GetHealth() (*health.GetHealthOK, error) { return nil, err } - response, err := client.Health.GetHealth(ctx,&health.GetHealthParams{}) + response, err := client.Health.GetHealth(ctx, &health.GetHealthParams{}) if err != nil { return nil, fmt.Errorf("error getting health status: %w", err) } diff --git a/pkg/views/health/view.go b/pkg/views/health/view.go index 31813d15..e94460b3 100644 --- a/pkg/views/health/view.go +++ b/pkg/views/health/view.go @@ -5,7 +5,7 @@ import ( "os" "github.com/charmbracelet/bubbles/table" - "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/health" "github.com/goharbor/harbor-cli/pkg/views" "github.com/goharbor/harbor-cli/pkg/views/base/tablelist" @@ -39,4 +39,4 @@ func styleStatus(status string) string { return views.GreenStyle.Render(status) } return views.RedStyle.Render(status) -} \ No newline at end of file +}