File size: 357 Bytes
7107f0b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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
}
|