mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Refine environment var
Address some review comments
This commit is contained in:
parent
999bdc58d3
commit
11b61b02c8
4 changed files with 26 additions and 31 deletions
|
@ -15,14 +15,12 @@ func LineSeparator() string {
|
|||
}
|
||||
|
||||
func GetToolLocation(file string) string {
|
||||
const name = "xray.location.tool"
|
||||
toolPath := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecutableDir)
|
||||
toolPath := NewEnvFlag(ToolLocation).GetValue(getExecutableDir)
|
||||
return filepath.Join(toolPath, file+".exe")
|
||||
}
|
||||
|
||||
// GetAssetLocation searches for `file` in the excutable dir
|
||||
func GetAssetLocation(file string) string {
|
||||
const name = "xray.location.asset"
|
||||
assetPath := NewEnvFlag(name).GetValue(getExecutableDir)
|
||||
assetPath := NewEnvFlag(AssetLocation).GetValue(getExecutableDir)
|
||||
return filepath.Join(assetPath, file)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue