package main import ( "os" "path/filepath" ) var ( RootDir = "" agentFileName = "lw_android_agent" agentVersionURL = "https://cdn2.bkdomain.cn/android-agent/VersionReport" agentVersionReportFileName = ".versionReport" childPID int ) func GetCurrentDirectory() (ret string) { dir, err := filepath.Abs(filepath.Dir(os.Args[0])) if err != nil { //fmt.Println("fail to get workdir:",err) ret = "/writable/agent-new" } else { ret = dir } return }