26 lines
358 B
Go
26 lines
358 B
Go
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"
|
|
}
|