.
This commit is contained in:
5
test/build_pi.bat
Normal file
5
test/build_pi.bat
Normal file
@@ -0,0 +1,5 @@
|
||||
set GOOS=linux
|
||||
set GOARCH=arm
|
||||
set GOARM=5
|
||||
go build
|
||||
pause
|
||||
1
test/path.txt
Normal file
1
test/path.txt
Normal file
@@ -0,0 +1 @@
|
||||
/home/beetsoft/
|
||||
BIN
test/test.exe
Normal file
BIN
test/test.exe
Normal file
Binary file not shown.
33
test/test.go
Normal file
33
test/test.go
Normal 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)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user