use conditional compilation for windows
This commit is contained in:
1 parent
eb2710c888
commit
458bc71688
7 files changed
+122
-93
No files matched your search
@@ -7,7 +7,6 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"runtime/pprof"
|
||||
)
|
||||
|
||||
@@ -48,15 +47,10 @@ func init() {
|
||||
envConfig = filepath.Join(envHome, ".config")
|
||||
}
|
||||
|
||||
tmp := os.TempDir()
|
||||
gSocketProt = gDefaultSocketProt
|
||||
gSocketPath = gDefaultSocketPath
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
gSocketProt = "tcp"
|
||||
gSocketPath = ":12345"
|
||||
} else {
|
||||
gSocketProt = "unix"
|
||||
gSocketPath = filepath.Join(tmp, fmt.Sprintf("lf.%s.sock", envUser))
|
||||
}
|
||||
tmp := os.TempDir()
|
||||
|
||||
gClientID = 1000
|
||||
gLogPath = filepath.Join(tmp, fmt.Sprintf("lf.%s.%d.log", envUser, gClientID))
|
||||
|
||||
Reference in new issue
Block a user