mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
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:
13
jsonrpc.go
13
jsonrpc.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user