Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulait committed Nov 26, 2024
1 parent cf3131c commit 1528776
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ jobs:
- name: Vet
run: make vet

- name: Lint
run: make lint
- name: lint
uses: golangci/golangci-lint-action@v6
with:
version: latest

- name: Helm Lint
run: make helm-lint
Expand Down
2 changes: 1 addition & 1 deletion cloud/linode/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func newCloud() (cloudprovider.Interface, error) {
if len(Options.IpHolderSuffix) > 23 {
msg := fmt.Sprintf("ip-holder-suffix must be 23 characters or less: %s is %d characters\n", Options.IpHolderSuffix, len(Options.IpHolderSuffix))
klog.Error(msg)
return nil, fmt.Errorf(msg)
return nil, fmt.Errorf("%s", msg)
}

// create struct that satisfies cloudprovider.Interface
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func main() {
linode.Options.KubeconfigFlag = command.Flags().Lookup("kubeconfig")
if linode.Options.KubeconfigFlag == nil {
msg := "kubeconfig missing from CCM flag set"
sentry.CaptureError(ctx, fmt.Errorf(msg))
sentry.CaptureError(ctx, fmt.Errorf("%s", msg))
fmt.Fprintf(os.Stderr, "kubeconfig missing from CCM flag set"+"\n")
os.Exit(1)
}
Expand All @@ -122,7 +122,7 @@ func main() {
_, network, err := net.ParseCIDR(externalSubnet)
if err != nil {
msg := fmt.Sprintf("Unable to parse %s as network subnet: %v", externalSubnet, err)
sentry.CaptureError(ctx, fmt.Errorf(msg))
sentry.CaptureError(ctx, fmt.Errorf("%s", msg))
fmt.Fprintf(os.Stderr, "%v\n", msg)
os.Exit(1)
}
Expand Down

0 comments on commit 1528776

Please sign in to comment.