15 lines
187 B
Go
15 lines
187 B
Go
package utils
|
|
|
|
import (
|
|
"path/filepath"
|
|
"strings"
|
|
)
|
|
|
|
func NormalizePath(path string) string {
|
|
if !strings.HasPrefix(path, "/") {
|
|
path = "/" + path
|
|
}
|
|
|
|
return filepath.Clean(path)
|
|
}
|