mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-04-09 02:13:35 +00:00
enable revive linter
- add package comments - fix redeclaration of built-in min/max - add comments to exported types - remove unused parameters
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Package main implements the command-line interface for controlling an X32 digital mixer.
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -161,7 +162,7 @@ type MainEqOnCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainEqOnCmd command, either retrieving the current EQ on/off state of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainEqOnCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainEqOnCmd) Run(ctx *context) error {
|
||||
if cmd.Enable == nil {
|
||||
resp, err := ctx.Client.Main.Eq.On(0)
|
||||
if err != nil {
|
||||
@@ -184,7 +185,7 @@ type MainEqBandGainCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainEqBandGainCmd command, either retrieving the current gain of a specific EQ band on the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainEqBandGainCmd) Run(ctx *context, main *MainCmdGroup, mainEq *MainEqCmdGroup) error {
|
||||
func (cmd *MainEqBandGainCmd) Run(ctx *context, mainEq *MainEqCmdGroup) error {
|
||||
if cmd.Level == nil {
|
||||
resp, err := ctx.Client.Main.Eq.Gain(0, *mainEq.Band.Band)
|
||||
if err != nil {
|
||||
@@ -212,7 +213,7 @@ type MainEqBandFreqCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainEqBandFreqCmd command, either retrieving the current frequency of a specific EQ band on the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainEqBandFreqCmd) Run(ctx *context, main *MainCmdGroup, mainEq *MainEqCmdGroup) error {
|
||||
func (cmd *MainEqBandFreqCmd) Run(ctx *context, mainEq *MainEqCmdGroup) error {
|
||||
if cmd.Frequency == nil {
|
||||
resp, err := ctx.Client.Main.Eq.Frequency(0, *mainEq.Band.Band)
|
||||
if err != nil {
|
||||
@@ -244,7 +245,7 @@ type MainEqBandQCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainEqBandQCmd command, either retrieving the current Q factor of a specific EQ band on the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainEqBandQCmd) Run(ctx *context, main *MainCmdGroup, mainEq *MainEqCmdGroup) error {
|
||||
func (cmd *MainEqBandQCmd) Run(ctx *context, mainEq *MainEqCmdGroup) error {
|
||||
if cmd.Q == nil {
|
||||
resp, err := ctx.Client.Main.Eq.Q(0, *mainEq.Band.Band)
|
||||
if err != nil {
|
||||
@@ -271,7 +272,7 @@ type MainEqBandTypeCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainEqBandTypeCmd command, either retrieving the current type of a specific EQ band on the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainEqBandTypeCmd) Run(ctx *context, main *MainCmdGroup, mainEq *MainEqCmdGroup) error {
|
||||
func (cmd *MainEqBandTypeCmd) Run(ctx *context, mainEq *MainEqCmdGroup) error {
|
||||
if cmd.Type == nil {
|
||||
resp, err := ctx.Client.Main.Eq.Type(0, *mainEq.Band.Band)
|
||||
if err != nil {
|
||||
@@ -307,7 +308,7 @@ type MainCompOnCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainCompOnCmd command, either retrieving the current compressor on/off state of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainCompOnCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainCompOnCmd) Run(ctx *context) error {
|
||||
if cmd.Enable == nil {
|
||||
resp, err := ctx.Client.Main.Comp.On(0)
|
||||
if err != nil {
|
||||
@@ -330,7 +331,7 @@ type MainCompModeCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainCompModeCmd command, either retrieving the current compressor mode of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainCompModeCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainCompModeCmd) Run(ctx *context) error {
|
||||
if cmd.Mode == nil {
|
||||
resp, err := ctx.Client.Main.Comp.Mode(0)
|
||||
if err != nil {
|
||||
@@ -353,7 +354,7 @@ type MainCompThresholdCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainCompThresholdCmd command, either retrieving the current compressor threshold of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainCompThresholdCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainCompThresholdCmd) Run(ctx *context) error {
|
||||
if cmd.Threshold == nil {
|
||||
resp, err := ctx.Client.Main.Comp.Threshold(0)
|
||||
if err != nil {
|
||||
@@ -376,7 +377,7 @@ type MainCompRatioCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainCompRatioCmd command, either retrieving the current compressor ratio of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainCompRatioCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainCompRatioCmd) Run(ctx *context) error {
|
||||
if cmd.Ratio == nil {
|
||||
resp, err := ctx.Client.Main.Comp.Ratio(0)
|
||||
if err != nil {
|
||||
@@ -399,7 +400,7 @@ type MainCompMixCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainCompMixCmd command, either retrieving the current compressor mix level of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainCompMixCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainCompMixCmd) Run(ctx *context) error {
|
||||
if cmd.Mix == nil {
|
||||
resp, err := ctx.Client.Main.Comp.Mix(0)
|
||||
if err != nil {
|
||||
@@ -422,7 +423,7 @@ type MainCompMakeupCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainCompMakeupCmd command, either retrieving the current compressor makeup gain of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainCompMakeupCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainCompMakeupCmd) Run(ctx *context) error {
|
||||
if cmd.Makeup == nil {
|
||||
resp, err := ctx.Client.Main.Comp.Makeup(0)
|
||||
if err != nil {
|
||||
@@ -445,7 +446,7 @@ type MainCompAttackCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainCompAttackCmd command, either retrieving the current compressor attack time of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainCompAttackCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainCompAttackCmd) Run(ctx *context) error {
|
||||
if cmd.Attack == nil {
|
||||
resp, err := ctx.Client.Main.Comp.Attack(0)
|
||||
if err != nil {
|
||||
@@ -468,7 +469,7 @@ type MainCompHoldCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainCompHoldCmd command, either retrieving the current compressor hold time of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainCompHoldCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainCompHoldCmd) Run(ctx *context) error {
|
||||
if cmd.Hold == nil {
|
||||
resp, err := ctx.Client.Main.Comp.Hold(0)
|
||||
if err != nil {
|
||||
@@ -491,7 +492,7 @@ type MainCompReleaseCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainCompReleaseCmd command, either retrieving the current compressor release time of the Main L/R output or setting it based on the provided argument.
|
||||
func (cmd *MainCompReleaseCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainCompReleaseCmd) Run(ctx *context) error {
|
||||
if cmd.Release == nil {
|
||||
resp, err := ctx.Client.Main.Comp.Release(0)
|
||||
if err != nil {
|
||||
|
||||
@@ -161,7 +161,7 @@ type MainMonoEqOnCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoEqOnCmd command, either retrieving the current EQ on/off state of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoEqOnCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoEqOnCmd) Run(ctx *context) error {
|
||||
if cmd.Enable == nil {
|
||||
resp, err := ctx.Client.MainMono.Eq.On(0)
|
||||
if err != nil {
|
||||
@@ -186,7 +186,6 @@ type MainMonoEqBandGainCmd struct {
|
||||
// Run executes the MainMonoEqBandGainCmd command, either retrieving the current gain of a specific EQ band on the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoEqBandGainCmd) Run(
|
||||
ctx *context,
|
||||
main *MainCmdGroup,
|
||||
mainEq *MainMonoEqCmdGroup,
|
||||
) error {
|
||||
if cmd.Level == nil {
|
||||
@@ -218,7 +217,6 @@ type MainMonoEqBandFreqCmd struct {
|
||||
// Run executes the MainMonoEqBandFreqCmd command, either retrieving the current frequency of a specific EQ band on the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoEqBandFreqCmd) Run(
|
||||
ctx *context,
|
||||
main *MainCmdGroup,
|
||||
mainEq *MainMonoEqCmdGroup,
|
||||
) error {
|
||||
if cmd.Frequency == nil {
|
||||
@@ -262,7 +260,6 @@ type MainMonoEqBandQCmd struct {
|
||||
// Run executes the MainMonoEqBandQCmd command, either retrieving the current Q factor of a specific EQ band on the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoEqBandQCmd) Run(
|
||||
ctx *context,
|
||||
main *MainCmdGroup,
|
||||
mainEq *MainMonoEqCmdGroup,
|
||||
) error {
|
||||
if cmd.Q == nil {
|
||||
@@ -293,7 +290,6 @@ type MainMonoEqBandTypeCmd struct {
|
||||
// Run executes the MainMonoEqBandTypeCmd command, either retrieving the current type of a specific EQ band on the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoEqBandTypeCmd) Run(
|
||||
ctx *context,
|
||||
main *MainCmdGroup,
|
||||
mainEq *MainMonoEqCmdGroup,
|
||||
) error {
|
||||
if cmd.Type == nil {
|
||||
@@ -331,7 +327,7 @@ type MainMonoCompOnCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoCompOnCmd command, either retrieving the current compressor on/off state of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoCompOnCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoCompOnCmd) Run(ctx *context) error {
|
||||
if cmd.Enable == nil {
|
||||
resp, err := ctx.Client.MainMono.Comp.On(0)
|
||||
if err != nil {
|
||||
@@ -354,7 +350,7 @@ type MainMonoCompModeCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoCompModeCmd command, either retrieving the current compressor mode of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoCompModeCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoCompModeCmd) Run(ctx *context) error {
|
||||
if cmd.Mode == nil {
|
||||
resp, err := ctx.Client.MainMono.Comp.Mode(0)
|
||||
if err != nil {
|
||||
@@ -377,7 +373,7 @@ type MainMonoCompThresholdCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoCompThresholdCmd command, either retrieving the current compressor threshold of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoCompThresholdCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoCompThresholdCmd) Run(ctx *context) error {
|
||||
if cmd.Threshold == nil {
|
||||
resp, err := ctx.Client.MainMono.Comp.Threshold(0)
|
||||
if err != nil {
|
||||
@@ -400,7 +396,7 @@ type MainMonoCompRatioCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoCompRatioCmd command, either retrieving the current compressor ratio of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoCompRatioCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoCompRatioCmd) Run(ctx *context) error {
|
||||
if cmd.Ratio == nil {
|
||||
resp, err := ctx.Client.MainMono.Comp.Ratio(0)
|
||||
if err != nil {
|
||||
@@ -423,7 +419,7 @@ type MainMonoCompMixCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoCompMixCmd command, either retrieving the current compressor mix level of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoCompMixCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoCompMixCmd) Run(ctx *context) error {
|
||||
if cmd.Mix == nil {
|
||||
resp, err := ctx.Client.MainMono.Comp.Mix(0)
|
||||
if err != nil {
|
||||
@@ -446,7 +442,7 @@ type MainMonoCompMakeupCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoCompMakeupCmd command, either retrieving the current compressor makeup gain of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoCompMakeupCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoCompMakeupCmd) Run(ctx *context) error {
|
||||
if cmd.Makeup == nil {
|
||||
resp, err := ctx.Client.MainMono.Comp.Makeup(0)
|
||||
if err != nil {
|
||||
@@ -469,7 +465,7 @@ type MainMonoCompAttackCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoCompAttackCmd command, either retrieving the current compressor attack time of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoCompAttackCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoCompAttackCmd) Run(ctx *context) error {
|
||||
if cmd.Attack == nil {
|
||||
resp, err := ctx.Client.MainMono.Comp.Attack(0)
|
||||
if err != nil {
|
||||
@@ -492,7 +488,7 @@ type MainMonoCompHoldCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoCompHoldCmd command, either retrieving the current compressor hold time of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoCompHoldCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoCompHoldCmd) Run(ctx *context) error {
|
||||
if cmd.Hold == nil {
|
||||
resp, err := ctx.Client.MainMono.Comp.Hold(0)
|
||||
if err != nil {
|
||||
@@ -515,7 +511,7 @@ type MainMonoCompReleaseCmd struct {
|
||||
}
|
||||
|
||||
// Run executes the MainMonoCompReleaseCmd command, either retrieving the current compressor release time of the Main Mono output or setting it based on the provided argument.
|
||||
func (cmd *MainMonoCompReleaseCmd) Run(ctx *context, main *MainCmdGroup) error {
|
||||
func (cmd *MainMonoCompReleaseCmd) Run(ctx *context) error {
|
||||
if cmd.Release == nil {
|
||||
resp, err := ctx.Client.MainMono.Comp.Release(0)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user