Skip to content

Commit

Permalink
fix golint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
songjiaxun committed May 15, 2023
1 parent e9dd5ac commit f0ad0d1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions cmd/csi_driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ var (
nodeID = flag.String("nodeid", "", "node id")
runController = flag.Bool("controller", false, "run controller service")
runNode = flag.Bool("node", false, "run node service")
httpEndpoint = flag.String("http-endpoint", "", "The TCP network address where the prometheus metrics endpoint will listen (example: `:8080`). The default is empty string, which means metrics endpoint is disabled.")
metricsPath = flag.String("metrics-path", "/metrics", "The HTTP path where prometheus metrics will be exposed. Default is `/metrics`.")
kubeconfigPath = flag.String("kubeconfig-path", "", "The kubeconfig path.")
sidecarImage = flag.String("sidecar-image", "", "The gcsfuse sidecar container image.")
identityPool = flag.String("identity-pool", "", "The Identity Pool to authenticate with GCS API.")
Expand Down
4 changes: 2 additions & 2 deletions hack/verify-golint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

TOOL_VERSION="v1.52.1"
TOOL_VERSION="v1.52.2"

export PATH=$PATH:$(go env GOPATH)/bin
go install "github.com/golangci/golangci-lint/cmd/golangci-lint@${TOOL_VERSION}"
Expand All @@ -32,6 +32,6 @@ golangci-lint run --no-config --deadline=10m --sort-results \
--enable-all \
--max-same-issues 100 \
--disable maligned,varcheck,nosnakecase,golint,scopelint,interfacer,deadcode,ifshort,structcheck,exhaustivestruct,exhaustruct,gomnd,lll,gochecknoglobals,funlen,varnamelen,wsl,testpackage,wrapcheck,goerr113,ireturn,gocyclo,cyclop,godox,gocognit,nestif \
--go 1.19.6 # the builder verison
--go 1.20.4 # the builder verison

echo "Congratulations! Lint check completed for all Go source files."
1 change: 0 additions & 1 deletion pkg/csi_driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ func (s *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublish
}
}

//Check if the Pod RestartPolicy is Never
podRestartPolicyIsNever := pod.Spec.RestartPolicy == v1.RestartPolicyNever

// Check if all the containers besides the sidecar container exited
Expand Down

0 comments on commit f0ad0d1

Please sign in to comment.