You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
585 B

package operaSystem
import "runtime"
func (os *OperaSystem) GOOS() string {
return runtime.GOOS
}
func (os *OperaSystem) GOARCH() string {
return runtime.GOARCH
}
func (os *OperaSystem) GOGC() string {
return runtime.Compiler
}
// IsWindows check if current os is windows
func (os *OperaSystem) IsWindows() bool {
return runtime.GOOS == "windows"
}
// IsLinux check if current os is linux
func (os *OperaSystem) IsLinux() bool {
return runtime.GOOS == "linux"
}
// IsMac check if current os is macos
func (os *OperaSystem) IsMac() bool {
return runtime.GOOS == "darwin"
}