Files
OpenList/pkg/utils/balance.go

19 lines
357 B
Go
Raw Permalink Normal View History

2022-06-10 16:49:52 +08:00
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")
2022-06-10 16:49:52 +08:00
if bIndex != -1 {
mountPath = mountPath[:bIndex]
2022-06-10 16:49:52 +08:00
}
return mountPath
2022-06-10 16:49:52 +08:00
}