github.com/godaddy-x/freego@v1.0.156/utils/os.go (about)

     1  package utils
     2  
     3  import "runtime"
     4  
     5  func MacOS() bool {
     6  	return runtime.GOOS == "darwin"
     7  }
     8  
     9  func LinuxOS() bool {
    10  	return runtime.GOOS == "linux"
    11  }
    12  
    13  func WindowsOS() bool {
    14  	return runtime.GOOS == "windows"
    15  }