Skip to content

Commit

Permalink
chore: use guard statement for utils_windows.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed Jan 29, 2024
1 parent d350b1a commit 1d2cf10
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions utils_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ import (
func osAwarePathDir(s string) string {
if strings.Contains(s, "/") {
return strings.ReplaceAll(filepath.Dir(s), "\\", "/")
} else {
return s
}
return s

}

func osAwarePathBase(s string) string {
if strings.Contains(s, "/") {
return strings.ReplaceAll(filepath.Base(s), "\\", "/")
} else {
return s
}
return s
}

func osAwarePathClean(s string) string {
if strings.Contains(s, "/") {
return strings.ReplaceAll(filepath.Clean(s), "\\", "/")
} else {
return s
}
return s

}

0 comments on commit 1d2cf10

Please sign in to comment.