Feat: decompression task

This commit is contained in:
HFO4
2020-02-03 13:23:33 +08:00
parent e722c33cd5
commit 91e202c7e6
19 changed files with 440 additions and 52 deletions

View File

@ -1,6 +1,9 @@
package util
import "strings"
import (
"path"
"strings"
)
// DotPathToStandardPath 将","分割的路径转换为标准路径
func DotPathToStandardPath(path string) string {
@ -37,3 +40,8 @@ func SplitPath(path string) []string {
pathSplit[0] = "/"
return pathSplit
}
// FormSlash 将path中的反斜杠'\'替换为'/'
func FormSlash(old string) string {
return path.Clean(strings.ReplaceAll(old, "\\", "/"))
}