File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 # Build Go binary
3232 - run : go build -v cmd/main.go
3333
34- # Compile test packages without running them to warm the build cache.
35- # The test job restores this cache and only needs to execute the binaries.
36- - run : go test -run=^$ ./...
34+ - run : go test ./...
3735
3836 lint :
3937 name : Lint
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ $(GOLANGCI_LINT): $(LOCALBIN)
222222 @[ -f $( GOLANGCI_LINT) ] || { \
223223 set -e; \
224224 echo " Downloading golangci-lint $( GOLANGCI_LINT_VERSION) " ; \
225- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD /install.sh | sh -s -- -b $(LOCALBIN ) $(GOLANGCI_LINT_VERSION ) ; \
225+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/$( GOLANGCI_LINT_VERSION ) /install.sh | sh -s -- -b $(LOCALBIN ) $(GOLANGCI_LINT_VERSION ) ; \
226226 mv $(LOCALBIN ) /golangci-lint $(GOLANGCI_LINT ) ; \
227227 }
228228
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package command
1818
1919import (
2020 "fmt"
21+ "io"
2122 "net/http"
2223 "strings"
2324 "time"
@@ -69,7 +70,8 @@ type clientAdapter struct {
6970func (c * clientAdapter ) GetAllMetadataFields (r v1.ApiGetMetadataFieldsRequest ) ([]v1.CSSCMSDataModelModelsMetadataType , error ) {
7071 fields , resp , err := c .getAllMetadataFields (r )
7172 if resp != nil && resp .Body != nil {
72- resp .Body .Close ()
73+ _ , _ = io .Copy (io .Discard , resp .Body )
74+ _ = resp .Body .Close ()
7375 }
7476 return fields , err
7577}
Original file line number Diff line number Diff line change 11package main
22
3+ import rego.v1
4+
35# Roles are namespace-scoped resources. A Role without a namespace will be
46# silently defaulted by the API server, which can result in permissions being
57# granted in an unintended namespace. Require every Role to declare its
Original file line number Diff line number Diff line change 11package main
22
3+ import rego.v1
4+
35# ServiceAccounts are namespace-scoped resources. A ServiceAccount without a namespace will be
46# silently defaulted by the API server, which can result in permissions being
57# granted in an unintended namespace. Require every ServiceAccount to declare its
You can’t perform that action at this time.
0 commit comments