Chore: Enable golangci-lint

Add a GitHub actions workflow to run golangci-lint.

Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
SuperQ
2025-01-05 18:36:25 +01:00
parent d3641bb4b9
commit 75296b4b7e
9 changed files with 63 additions and 23 deletions

View File

@@ -195,8 +195,7 @@ func rpcSetEDID(edid string) error {
// Save EDID to config, allowing it to be restored on reboot.
config.EdidString = edid
SaveConfig()
_ = SaveConfig()
return nil
}
@@ -596,18 +595,18 @@ func rpcSetActiveExtension(extensionId string) error {
return nil
}
if config.ActiveExtension == "atx-power" {
unmountATXControl()
_ = unmountATXControl()
} else if config.ActiveExtension == "dc-power" {
unmountDCControl()
_ = unmountDCControl()
}
config.ActiveExtension = extensionId
if err := SaveConfig(); err != nil {
return fmt.Errorf("failed to save config: %w", err)
}
if extensionId == "atx-power" {
mountATXControl()
_ = mountATXControl()
} else if extensionId == "dc-power" {
mountDCControl()
_ = mountDCControl()
}
return nil
}
@@ -728,7 +727,7 @@ func rpcSetSerialSettings(settings SerialSettings) error {
Parity: parity,
}
port.SetMode(serialPortMode)
_ = port.SetMode(serialPortMode)
return nil
}