mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-04-09 02:13:35 +00:00
enable goconst linter
add package level constants for true/false str values
This commit is contained in:
@@ -36,7 +36,7 @@ func (cmd *DCAMuteCmd) Run(ctx *context, dca *DCACmdGroup) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := ctx.Client.DCA.SetMute(dca.Index.Index, *cmd.State == "true"); err != nil {
|
||||
if err := ctx.Client.DCA.SetMute(dca.Index.Index, *cmd.State == trueStr); err != nil {
|
||||
return fmt.Errorf("failed to set DCA mute status: %w", err)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user