| 12345678910111213141516171819202122232425262728 |
- //go:build !windows
- package main
- import "fmt"
- // runPlatformService 非 Windows 平台不支持服务模式
- func runPlatformService() error {
- return fmt.Errorf("服务模式仅支持 Windows")
- }
- // windowsServiceRunning 非 Windows 平台不存在 Windows 服务
- func windowsServiceRunning() bool { return false }
- // startPlatformService 非 Windows 平台无法创建服务
- func startPlatformService() (string, error) {
- return "", fmt.Errorf("服务模式仅支持 Windows")
- }
- // stopPlatformService 非 Windows 平台无法停止服务
- func stopPlatformService() (string, error) {
- return "", fmt.Errorf("服务模式仅支持 Windows")
- }
- // deletePlatformService 非 Windows 平台无法删除服务
- func deletePlatformService() (string, error) {
- return "", fmt.Errorf("服务模式仅支持 Windows")
- }
|