feat(sol): UDP + HTTP listener
This commit is contained in:
18
system/shutdown_windows.go
Normal file
18
system/shutdown_windows.go
Normal file
@@ -0,0 +1,18 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package system
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// Shutdown shuts down the system (Windows)
|
||||
func Shutdown() {
|
||||
cmd := exec.Command("shutdown", "/s", "/t", "0")
|
||||
|
||||
if err := cmd.Run(); err != nil {
|
||||
log.Fatalf("Failed to shutdown system: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user