windows.go 796 B

1234567891011121314151617181920212223242526272829303132
  1. //go:build windows
  2. // +build windows
  3. package platform
  4. import "path/filepath"
  5. func ExpandEnv(s string) string {
  6. // TODO
  7. return s
  8. }
  9. func LineSeparator() string {
  10. return "\r\n"
  11. }
  12. func GetToolLocation(file string) string {
  13. toolPath := NewEnvFlag(ToolLocation).GetValue(getExecutableDir)
  14. return filepath.Join(toolPath, file+".exe")
  15. }
  16. // GetAssetLocation searches for `file` in the env dir and the executable dir
  17. func GetAssetLocation(file string) string {
  18. assetPath := NewEnvFlag(AssetLocation).GetValue(getExecutableDir)
  19. return filepath.Join(assetPath, file)
  20. }
  21. // GetCertLocation searches for `file` in the env dir and the executable dir
  22. func GetCertLocation(file string) string {
  23. certPath := NewEnvFlag(CertLocation).GetValue(getExecutableDir)
  24. return filepath.Join(certPath, file)
  25. }