Skip to content

Commit

Permalink
appease the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sauterp committed May 13, 2024
1 parent 0a13aaa commit d56a88a
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GO_MK_REF := v1.0.1
GO_MK_REF := philippsauter/sc-95507/public-tooling-switch-golanci-lint-staticcheck

# make go.mk a dependency for all targets
.EXTRA_PREREQS = go.mk
Expand Down
2 changes: 1 addition & 1 deletion cmd/iam_role_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (c *iamRoleShowCmd) cmdPreRun(cmd *cobra.Command, args []string) error {

func (c *iamRoleShowCmd) cmdRun(_ *cobra.Command, _ []string) error {
if c.Role == "" {
return errors.New("Role ID not provided") //nolint: stylecheck
return errors.New("role ID not provided")
}

zone := account.CurrentAccount.DefaultZone
Expand Down
2 changes: 1 addition & 1 deletion cmd/iam_role_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *iamRoleUpdateCmd) cmdPreRun(cmd *cobra.Command, args []string) error {

func (c *iamRoleUpdateCmd) cmdRun(cmd *cobra.Command, _ []string) error {
if c.Role == "" {
return errors.New("Role not provided") // nolint:stylecheck
return errors.New("role not provided")
}

zone := account.CurrentAccount.DefaultZone
Expand Down
3 changes: 2 additions & 1 deletion cmd/icmp_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"golang.org/x/text/language"
)

//lint:file-ignore U1000 unknown

type icmpCode uint16

// nolint
const (
//destinationUnreachable
netUnreachable icmpCode = 0x0300
Expand Down
2 changes: 2 additions & 0 deletions cmd/icmp_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (

//go:generate stringer -type=icmpType

//lint:file-ignore U1000 unknown

type icmpType uint8

// nolint
Expand Down
4 changes: 2 additions & 2 deletions cmd/instance_pool_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ func (c *instancePoolDeleteCmd) cmdRun(_ *cobra.Command, _ []string) error {
for _, nlb := range nlbs {
for _, svc := range nlb.Services {
if svc.InstancePoolID == instancePool.ID {
return fmt.Errorf( // nolint:stylecheck
"Instance Pool %q is still referenced by NLB service %s/%s",
return fmt.Errorf(
"instance Pool %q is still referenced by NLB service %s/%s",
*instancePool.Name,
*nlb.Name,
*svc.Name,
Expand Down
2 changes: 1 addition & 1 deletion cmd/instance_snapshot_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (c *instanceSnapshotCreateCmd) cmdRun(_ *cobra.Command, _ []string) error {
snapshot, err = globalstate.EgoscaleClient.CreateInstanceSnapshot(ctx, c.Zone, instance)
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
err = fmt.Errorf("Request timeout reached. Snapshot creation is not canceled and might still be running, check the status with: exo c i snapshot list") // nolint:stylecheck
err = fmt.Errorf("request timeout reached. Snapshot creation is not canceled and might still be running, check the status with: exo c i snapshot list") // nolint:stylecheck
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/sks_nodepool_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (c *sksNodepoolDeleteCmd) cmdRun(_ *cobra.Command, _ []string) error {
}
}

return errors.New("Nodepool not found") // nolint:stylecheck
return errors.New("nodepool not found") // nolint:stylecheck
}

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/sks_nodepool_evict.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (c *sksNodepoolEvictCmd) cmdRun(cmd *cobra.Command, _ []string) error {
}
}
if nodepool == nil {
return errors.New("Nodepool not found") // nolint:stylecheck
return errors.New("nodepool not found")
}

nodes := make([]string, len(c.Nodes))
Expand Down
2 changes: 1 addition & 1 deletion cmd/sks_nodepool_scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (c *sksNodepoolScaleCmd) cmdRun(_ *cobra.Command, _ []string) error {
}
}
if nodepool == nil {
return errors.New("Nodepool not found") // nolint:stylecheck
return errors.New("nodepool not found")
}

decorateAsyncOperation(fmt.Sprintf("Scaling Nodepool %q...", c.Nodepool), func() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/sks_nodepool_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (c *sksNodepoolShowCmd) cmdRun(_ *cobra.Command, _ []string) error {
}
}
if nodepool == nil {
return errors.New("Nodepool not found") // nolint:stylecheck
return errors.New("nodepool not found")
}

out := sksNodepoolShowOutput{
Expand Down
2 changes: 1 addition & 1 deletion cmd/sks_nodepool_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (c *sksNodepoolUpdateCmd) cmdRun(cmd *cobra.Command, _ []string) error { //
}
}
if nodepool == nil {
return errors.New("Nodepool not found") // nolint:stylecheck
return errors.New("nodepool not found")
}

if cmd.Flags().Changed(mustCLICommandFlagName(c, &c.AntiAffinityGroups)) {
Expand Down

0 comments on commit d56a88a

Please sign in to comment.