Check if the process is running as administrator on Windows
package main
import (
"fmt"
. "github.com/dlion/IsWadmin"
)
func main() {
if IsWadmin() {
fmt.Println("This process is running as administrator on Windows")
}
}
go test
Domenico Luciani
MIT