oc-local/cmd/os.go

26 lines
358 B
Go
Raw Normal View History

2024-09-27 16:10:15 +02:00
package cmd
import "runtime"
func getOsName() string {
return runtime.GOOS
}
func getOsArch() string {
return runtime.GOARCH
}
func getExecutableName(exeName string) string {
if runtime.GOOS == "windows" {
return exeName + ".exe"
}
return exeName
}
func getMoveCommand() string {
if runtime.GOOS == "windows" {
return "move"
}
return "mv"
}