mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-15 21:07:15 +03:00
Refine environment var
Address some review comments
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user