Files
wingotil/main.go
2024-10-09 04:59:58 -05:00

25 lines
344 B
Go

package main
import (
"fmt"
"gitlab.com/developerdurp/wingotil/pkg/ostype"
"log"
)
func main() {
os, err := ostype.GetOsType()
if err != nil {
log.Fatal(err)
}
switch os.(type) {
case *ostype.WinVer:
fmt.Println("Windows")
case *ostype.LinVer:
fmt.Println("Linux")
default:
fmt.Println("unable to detect OS version")
}
}