Sometimes it could be effective to use strings.Cut:
before, after, found := strings.Cut( "somethingtodo", "to" )
If "to" was found, you could use "something" and "do" afterwards.