2022-06-10 08:49:52 +00:00
|
|
|
package utils
|
|
|
|
|
|
|
|
import "strings"
|
|
|
|
|
|
|
|
var balance = ".balance"
|
|
|
|
|
|
|
|
func IsBalance(str string) bool {
|
|
|
|
return strings.Contains(str, balance)
|
|
|
|
}
|
|
|
|
|
2022-12-18 11:51:20 +00:00
|
|
|
// GetActualMountPath remove balance suffix
|
2023-01-16 09:33:24 +00:00
|
|
|
func GetActualMountPath(mountPath string) string {
|
|
|
|
bIndex := strings.LastIndex(mountPath, ".balance")
|
2022-06-10 08:49:52 +00:00
|
|
|
if bIndex != -1 {
|
2023-01-16 09:33:24 +00:00
|
|
|
mountPath = mountPath[:bIndex]
|
2022-06-10 08:49:52 +00:00
|
|
|
}
|
2023-01-16 09:33:24 +00:00
|
|
|
return mountPath
|
2022-06-10 08:49:52 +00:00
|
|
|
}
|