I need to combine strings.SplitN and strings.SplitFunc. the input string might have any kind of whitespace and I just need the first two splitted substrings and remaining string should be parsed in another run. The SplitN function splits the input up to the N parameter but just consider space not whitespace. You can define your special splitter in SplitFunc, in my case something like this:
f := func(r rune) bool {
return unicode.IsSpace(r)
}
but I can not define the number of substring in SplitFunc.
the function strings.Fields is also not useful since there is no limit in this function.