Initial commit

This commit is contained in:
2024-10-09 04:59:58 -05:00
parent 4f72da3cc6
commit 35bc3643ca
3 changed files with 106 additions and 0 deletions

24
main.go Normal file
View File

@@ -0,0 +1,24 @@
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")
}
}