others.go 392 B

12345678910111213141516171819202122
  1. // +build !windows
  2. package platform
  3. import (
  4. "os"
  5. "path/filepath"
  6. )
  7. func ExpandEnv(s string) string {
  8. return os.ExpandEnv(s)
  9. }
  10. func LineSeparator() string {
  11. return "\n"
  12. }
  13. func GetToolLocation(file string) string {
  14. const name = "v2ray.location.tool"
  15. toolPath := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecutableDir)
  16. return filepath.Join(toolPath, file)
  17. }