use conditional compilation for windows

This commit is contained in:
Gokcehan committed 2017-08-05 19:23:55 +03:00
1 parent eb2710c888
commit 458bc71688
7 files changed
+122 -93

No files matched your search

+3 -9
View File
@@ -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))