Initial commit
This commit is contained in:
25
cmd/os.go
Normal file
25
cmd/os.go
Normal file
@@ -0,0 +1,25 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user