refactor(instance): change instance deletion to use ID instead of name

- Update DBRemoveFrpcInstance to use instanceID for deletion
- Modify DeleteInstanceHandler to accept and validate instanceID
- Improve error messages for invalid instanceID format
- Update logging to use instanceID instead of instanceName
This commit is contained in:
2026-03-25 10:49:30 +08:00
parent 802a726464
commit 3a00f5d6a5
3 changed files with 20 additions and 15 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
package main
import (
"errors"
"fmt"
"os"
"os/exec"
@@ -56,7 +55,7 @@ func createBootService(username, instanceName, configPath, runUser string) error
case "windows":
return createWindowsBootService(username, instanceName, configPath)
default:
return errors.New("unsupported init system")
return fmt.Errorf("unsupported init system: %s", initType)
}
}