github.com/eagleql/xray-core@v1.4.4/common/platform/windows.go (about) 1 // +build windows 2 3 package platform 4 5 import "path/filepath" 6 7 func ExpandEnv(s string) string { 8 // TODO 9 return s 10 } 11 12 func LineSeparator() string { 13 return "\r\n" 14 } 15 16 func GetToolLocation(file string) string { 17 const name = "xray.location.tool" 18 toolPath := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecutableDir) 19 return filepath.Join(toolPath, file+".exe") 20 } 21 22 // GetAssetLocation search for `file` in the excutable dir 23 func GetAssetLocation(file string) string { 24 const name = "xray.location.asset" 25 assetPath := NewEnvFlag(name).GetValue(getExecutableDir) 26 return filepath.Join(assetPath, file) 27 }