diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7b1d4720..a8b0e771 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: # see https://github.com/golangci/golangci-lint-action/issues/807 cache: false - name: golangci-lint - uses: golangci/golangci-lint-action@v4 + uses: golangci/golangci-lint-action@v6 with: version: latest diff --git a/pkg/c8y/client.go b/pkg/c8y/client.go index df472ed1..47750a31 100644 --- a/pkg/c8y/client.go +++ b/pkg/c8y/client.go @@ -1371,7 +1371,7 @@ func (c *Client) DefaultDryRunHandler(options *RequestOptions, req *http.Request message += "\nBody: (empty)\n" } - if options.FormData != nil && len(options.FormData) > 0 { + if len(options.FormData) > 0 { message += "\nForm Data:\n" // Sort formdata keys diff --git a/pkg/c8y/context.go b/pkg/c8y/context.go index 4b3b43dc..ed714b11 100644 --- a/pkg/c8y/context.go +++ b/pkg/c8y/context.go @@ -40,7 +40,7 @@ func (s *ContextService) ServiceUserContext(tenant string, skipUpdateServiceUser client.Microservice.SetServiceUsers() } - if client.ServiceUsers == nil || len(client.ServiceUsers) == 0 { + if len(client.ServiceUsers) == 0 { panic("No service users found") } var auth string