mirror of https://github.com/Xhofe/alist
19 lines
357 B
Go
19 lines
357 B
Go
package utils
|
|
|
|
import "strings"
|
|
|
|
var balance = ".balance"
|
|
|
|
func IsBalance(str string) bool {
|
|
return strings.Contains(str, balance)
|
|
}
|
|
|
|
// GetActualMountPath remove balance suffix
|
|
func GetActualMountPath(mountPath string) string {
|
|
bIndex := strings.LastIndex(mountPath, ".balance")
|
|
if bIndex != -1 {
|
|
mountPath = mountPath[:bIndex]
|
|
}
|
|
return mountPath
|
|
}
|