Skip to content

Commit a49f6ff

Browse files
committed
Enable and fix gosimple issues
1 parent 8b7c4cd commit a49f6ff

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
# args: --issues-exit-code=0
3636

3737
# For now, Smart Node will only enforce goimports linting
38-
args: --disable-all --enable goimports --enable staticcheck --enable ineffassign
38+
args: --disable-all --enable goimports --enable staticcheck --enable ineffassign --enable gosimple
3939

4040
# Optional: show only new issues if it's a pull request. The default value is `false`.
4141
# only-new-issues: true

rocketpool-cli/client/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (c *Client) InstallService(verbose bool, noDeps bool, version string, path
132132
func (c *Client) InstallUpdateTracker(verbose bool, version string, useLocalInstaller bool) error {
133133
// Get installation script flags
134134
flags := []string{
135-
"-v", fmt.Sprintf("%s", shellescape.Quote(version)),
135+
"-v", shellescape.Quote(version),
136136
}
137137

138138
var script []byte

rocketpool-cli/commands/wallet/bip39/mnemonic-validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (mv *MnemonicValidator) Filled() bool {
4747

4848
func (mv *MnemonicValidator) Finalize() (string, error) {
4949

50-
if mv.Filled() == false {
50+
if !mv.Filled() {
5151
return "", errors.New("Not enough words were entered.")
5252
}
5353

rocketpool-daemon/common/alerting/alerting.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func AlertFeeRecipientChanged(cfg *config.SmartNodeConfig, newFeeRecipient commo
4545
return nil
4646
}
4747

48-
if cfg.Alertmanager.AlertEnabled_FeeRecipientChanged.Value != true {
48+
if !cfg.Alertmanager.AlertEnabled_FeeRecipientChanged.Value {
4949
logMessage("alert for FeeRecipientChanged is disabled, not sending.")
5050
return nil
5151
}
@@ -71,7 +71,7 @@ func AlertMinipoolBondReduced(cfg *config.SmartNodeConfig, minipoolAddress commo
7171
return nil
7272
}
7373

74-
if cfg.Alertmanager.AlertEnabled_MinipoolBondReduced.Value != true {
74+
if !cfg.Alertmanager.AlertEnabled_MinipoolBondReduced.Value {
7575
logMessage("alert for MinipoolBondReduced is disabled, not sending.")
7676
return nil
7777
}
@@ -100,7 +100,7 @@ func AlertMinipoolBalanceDistributed(cfg *config.SmartNodeConfig, minipoolAddres
100100
return nil
101101
}
102102

103-
if cfg.Alertmanager.AlertEnabled_MinipoolBalanceDistributed.Value != true {
103+
if !cfg.Alertmanager.AlertEnabled_MinipoolBalanceDistributed.Value {
104104
logMessage("alert for MinipoolBalanceDistributed is disabled, not sending.")
105105
return nil
106106
}
@@ -128,7 +128,7 @@ func AlertMinipoolPromoted(cfg *config.SmartNodeConfig, minipoolAddress common.A
128128
return nil
129129
}
130130

131-
if cfg.Alertmanager.AlertEnabled_MinipoolPromoted.Value != true {
131+
if !cfg.Alertmanager.AlertEnabled_MinipoolPromoted.Value {
132132
logMessage("alert for MinipoolPromoted is disabled, not sending.")
133133
return nil
134134
}
@@ -156,7 +156,7 @@ func AlertMinipoolStaked(cfg *config.SmartNodeConfig, minipoolAddress common.Add
156156
return nil
157157
}
158158

159-
if cfg.Alertmanager.AlertEnabled_MinipoolStaked.Value != true {
159+
if !cfg.Alertmanager.AlertEnabled_MinipoolStaked.Value {
160160
logMessage("alert for MinipoolStaked is disabled, not sending.")
161161
return nil
162162
}
@@ -193,15 +193,15 @@ func getAlertSettingsForEvent(succeeded bool) (strfmt.DateTime, Severity, string
193193
}
194194

195195
func AlertExecutionClientSyncComplete(cfg *config.SmartNodeConfig) error {
196-
if cfg.Alertmanager.AlertEnabled_ExecutionClientSyncComplete.Value != true {
196+
if !cfg.Alertmanager.AlertEnabled_ExecutionClientSyncComplete.Value {
197197
logMessage("alert for ExecutionClientSyncComplete is disabled, not sending.")
198198
return nil
199199
}
200200
return alertClientSyncComplete(cfg, ClientKindExecution)
201201
}
202202

203203
func AlertBeaconClientSyncComplete(cfg *config.SmartNodeConfig) error {
204-
if cfg.Alertmanager.AlertEnabled_BeaconClientSyncComplete.Value != true {
204+
if !cfg.Alertmanager.AlertEnabled_BeaconClientSyncComplete.Value {
205205
logMessage("alert for BeaconClientSyncComplete is disabled, not sending.")
206206
return nil
207207
}

0 commit comments

Comments
 (0)