wide/util/os.go

16 lines
206 B
Go
Raw Normal View History

2014-10-26 10:41:34 +03:00
package util
import (
"runtime"
)
type myos struct{}
// 操作系统工具.
var OS = myos{}
// 判断是否是 Windows 操作系统.
func (*myos) IsWindows() bool {
return "windows" == runtime.GOOS
}