Build launcher cho PC theo user PC

This commit is contained in:
2020-09-24 09:45:28 +07:00
parent 8b370c5c8a
commit 40b5fab0f9
17 changed files with 3037 additions and 0 deletions

5
test/build_pi.bat Normal file
View File

@@ -0,0 +1,5 @@
set GOOS=linux
set GOARCH=arm
set GOARM=5
go build
pause

1
test/path.txt Normal file
View File

@@ -0,0 +1 @@
/home/beetsoft/

BIN
test/test.exe Normal file

Binary file not shown.

33
test/test.go Normal file
View File

@@ -0,0 +1,33 @@
package main
import (
"fmt"
"os"
"strconv"
"time"
)
var path_base = "/home/ademax/"
func main() {
Setpath()
time.Sleep(10 * time.Second)
}
func test() {
var path string
year, month, day := time.Now().Date()
path = strconv.Itoa(year) + "-" + strconv.Itoa(int(month)) + "-" + strconv.Itoa(day) + ".txt"
fmt.Println(path)
}
func Setpath() {
if os.Args != nil {
fmt.Println(os.Args)
fmt.Println(path_base)
path_base = os.Args[1]
fmt.Println("Thay the path_base")
fmt.Println("Path_base:", path_base)
}
}