func main() { s := '196:廊坊市-199:固安县' fmt.Print(splitStringChar(s))}func splitString(r rune) bool { return r == ':' || r == '-'}func splitStringChar(s string) []string { a := strings.FieldsFunc(s, splitString) return a}