go_dreamfactory/utils/strings.go
2022-06-06 14:40:16 +08:00

18 lines
261 B
Go

package utils
import (
"strings"
"github.com/liwei1dao/lego/sys/log"
)
func ParseP(p string) (string, string, bool) {
s := strings.SplitN(p, ".", 2)
if len(s) < 2 {
log.Debugf("param P err: %s", p)
return "", "", false
}
return s[0], s[1], true
}