mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
refactor: update golintci-lint and linter issues
* Update golangci-lint Update golangci-lint to v2. Signed-off-by: SuperQ <superq@gmail.com> * Fixup various linter issues. Signed-off-by: SuperQ <superq@gmail.com> --------- Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
10
jsonrpc.go
10
jsonrpc.go
@@ -659,18 +659,20 @@ func rpcSetActiveExtension(extensionId string) error {
|
||||
if config.ActiveExtension == extensionId {
|
||||
return nil
|
||||
}
|
||||
if config.ActiveExtension == "atx-power" {
|
||||
switch config.ActiveExtension {
|
||||
case "atx-power":
|
||||
_ = unmountATXControl()
|
||||
} else if config.ActiveExtension == "dc-power" {
|
||||
case "dc-power":
|
||||
_ = unmountDCControl()
|
||||
}
|
||||
config.ActiveExtension = extensionId
|
||||
if err := SaveConfig(); err != nil {
|
||||
return fmt.Errorf("failed to save config: %w", err)
|
||||
}
|
||||
if extensionId == "atx-power" {
|
||||
switch extensionId {
|
||||
case "atx-power":
|
||||
_ = mountATXControl()
|
||||
} else if extensionId == "dc-power" {
|
||||
case "dc-power":
|
||||
_ = mountDCControl()
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user