mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-02-26 08:19:11 +00:00
add godot linter
This commit is contained in:
parent
b6b64781ed
commit
23285e6e50
@ -6,7 +6,7 @@ run:
|
|||||||
go: '1.24'
|
go: '1.24'
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
disable: [dupl, errcheck, goconst, godot]
|
disable: [dupl, errcheck, goconst]
|
||||||
enable:
|
enable:
|
||||||
# Default enabled linters
|
# Default enabled linters
|
||||||
- errcheck # Check for unchecked errors
|
- errcheck # Check for unchecked errors
|
||||||
|
|||||||
@ -8,7 +8,7 @@ type DCA struct {
|
|||||||
baseAddress string
|
baseAddress string
|
||||||
}
|
}
|
||||||
|
|
||||||
// newDCA creates a new DCA instance
|
// newDCA creates a new DCA instance.
|
||||||
func newDCA(c *client) *DCA {
|
func newDCA(c *client) *DCA {
|
||||||
return &DCA{
|
return &DCA{
|
||||||
client: c,
|
client: c,
|
||||||
@ -16,7 +16,7 @@ func newDCA(c *client) *DCA {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mute requests the current mute status for a DCA group
|
// Mute requests the current mute status for a DCA group.
|
||||||
func (d *DCA) Mute(group int) (bool, error) {
|
func (d *DCA) Mute(group int) (bool, error) {
|
||||||
address := fmt.Sprintf(d.baseAddress, group) + "/on"
|
address := fmt.Sprintf(d.baseAddress, group) + "/on"
|
||||||
err := d.client.SendMessage(address)
|
err := d.client.SendMessage(address)
|
||||||
@ -35,7 +35,7 @@ func (d *DCA) Mute(group int) (bool, error) {
|
|||||||
return val == 0, nil
|
return val == 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetMute sets the mute status for a specific DCA group (1-based indexing)
|
// SetMute sets the mute status for a specific DCA group (1-based indexing).
|
||||||
func (d *DCA) SetMute(group int, muted bool) error {
|
func (d *DCA) SetMute(group int, muted bool) error {
|
||||||
address := fmt.Sprintf(d.baseAddress, group) + "/on"
|
address := fmt.Sprintf(d.baseAddress, group) + "/on"
|
||||||
var value int32
|
var value int32
|
||||||
@ -45,7 +45,7 @@ func (d *DCA) SetMute(group int, muted bool) error {
|
|||||||
return d.client.SendMessage(address, value)
|
return d.client.SendMessage(address, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Name requests the current name for a DCA group
|
// Name requests the current name for a DCA group.
|
||||||
func (d *DCA) Name(group int) (string, error) {
|
func (d *DCA) Name(group int) (string, error) {
|
||||||
address := fmt.Sprintf(d.baseAddress, group) + "/config/name"
|
address := fmt.Sprintf(d.baseAddress, group) + "/config/name"
|
||||||
err := d.client.SendMessage(address)
|
err := d.client.SendMessage(address)
|
||||||
@ -64,13 +64,13 @@ func (d *DCA) Name(group int) (string, error) {
|
|||||||
return name, nil
|
return name, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetName sets the name for a specific DCA group (1-based indexing)
|
// SetName sets the name for a specific DCA group (1-based indexing).
|
||||||
func (d *DCA) SetName(group int, name string) error {
|
func (d *DCA) SetName(group int, name string) error {
|
||||||
address := fmt.Sprintf(d.baseAddress, group) + "/config/name"
|
address := fmt.Sprintf(d.baseAddress, group) + "/config/name"
|
||||||
return d.client.SendMessage(address, name)
|
return d.client.SendMessage(address, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Colour requests the current colour for a DCA group
|
// Colour requests the current colour for a DCA group.
|
||||||
func (d *DCA) Colour(group int) (int32, error) {
|
func (d *DCA) Colour(group int) (int32, error) {
|
||||||
address := fmt.Sprintf(d.baseAddress, group) + "/config/colour"
|
address := fmt.Sprintf(d.baseAddress, group) + "/config/colour"
|
||||||
err := d.client.SendMessage(address)
|
err := d.client.SendMessage(address)
|
||||||
@ -89,7 +89,7 @@ func (d *DCA) Colour(group int) (int32, error) {
|
|||||||
return colour, nil
|
return colour, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetColor sets the colour for a specific DCA group (1-based indexing)
|
// SetColor sets the colour for a specific DCA group (1-based indexing).
|
||||||
func (d *DCA) SetColor(group int, colour int32) error {
|
func (d *DCA) SetColor(group int, colour int32) error {
|
||||||
address := fmt.Sprintf(d.baseAddress, group) + "/config/colour"
|
address := fmt.Sprintf(d.baseAddress, group) + "/config/colour"
|
||||||
return d.client.SendMessage(address, colour)
|
return d.client.SendMessage(address, colour)
|
||||||
|
|||||||
@ -11,7 +11,7 @@ type Strip struct {
|
|||||||
Comp *Comp
|
Comp *Comp
|
||||||
}
|
}
|
||||||
|
|
||||||
// newStrip creates a new Strip instance
|
// newStrip creates a new Strip instance.
|
||||||
func newStrip(c *client) *Strip {
|
func newStrip(c *client) *Strip {
|
||||||
return &Strip{
|
return &Strip{
|
||||||
client: c,
|
client: c,
|
||||||
@ -77,7 +77,7 @@ func (s *Strip) SetFader(strip int, level float64) error {
|
|||||||
return s.client.SendMessage(address, float32(mustDbInto(level)))
|
return s.client.SendMessage(address, float32(mustDbInto(level)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Name requests the name for a specific strip
|
// Name requests the name for a specific strip.
|
||||||
func (s *Strip) Name(strip int) (string, error) {
|
func (s *Strip) Name(strip int) (string, error) {
|
||||||
address := fmt.Sprintf(s.baseAddress, strip) + "/config/name"
|
address := fmt.Sprintf(s.baseAddress, strip) + "/config/name"
|
||||||
err := s.client.SendMessage(address)
|
err := s.client.SendMessage(address)
|
||||||
@ -96,13 +96,13 @@ func (s *Strip) Name(strip int) (string, error) {
|
|||||||
return val, nil
|
return val, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetName sets the name for a specific strip
|
// SetName sets the name for a specific strip.
|
||||||
func (s *Strip) SetName(strip int, name string) error {
|
func (s *Strip) SetName(strip int, name string) error {
|
||||||
address := fmt.Sprintf(s.baseAddress, strip) + "/config/name"
|
address := fmt.Sprintf(s.baseAddress, strip) + "/config/name"
|
||||||
return s.client.SendMessage(address, name)
|
return s.client.SendMessage(address, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Colour requests the colour for a specific strip
|
// Colour requests the colour for a specific strip.
|
||||||
func (s *Strip) Colour(strip int) (int32, error) {
|
func (s *Strip) Colour(strip int) (int32, error) {
|
||||||
address := fmt.Sprintf(s.baseAddress, strip) + "/config/colour"
|
address := fmt.Sprintf(s.baseAddress, strip) + "/config/colour"
|
||||||
err := s.client.SendMessage(address)
|
err := s.client.SendMessage(address)
|
||||||
@ -121,7 +121,7 @@ func (s *Strip) Colour(strip int) (int32, error) {
|
|||||||
return val, nil
|
return val, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetColor sets the colour for a specific strip (0-15)
|
// SetColor sets the colour for a specific strip (0-15).
|
||||||
func (s *Strip) SetColor(strip int, colour int32) error {
|
func (s *Strip) SetColor(strip int, colour int32) error {
|
||||||
address := fmt.Sprintf(s.baseAddress, strip) + "/config/colour"
|
address := fmt.Sprintf(s.baseAddress, strip) + "/config/colour"
|
||||||
return s.client.SendMessage(address, colour)
|
return s.client.SendMessage(address, colour)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user