You can see how the different runtime.GOOS values are defined in the
OS-specific runtime files like
https://github.com/golang/go/blob/master/src/runtime/internal/sys/zgoos_windows.go.
They happen to be lowercase, but I don't know anything that guarantees that
in any future.
Curious though, why doe
This may be a completely stupid or trivial question; however...
I currently use this on some old code I'm working on and trying to clean
things up:
switch os := strings.ToLower(runtime.GOOS); os {
case "windows":
// do windows stuff here
case "linux":
// do linux stuff here
default:
//