code: func findValidSplit(line string, maxBytes int) (splitOffset, effectiveBytes int) {
  	for offset, rune := range line {
  		splitOffset = offset
  		if effectiveBytes+utf8.RuneLen(rune) > maxBytes {
  			return splitOffset, effectiveBytes
  		}
  		effectiveBytes += utf8.RuneLen(rune)
  	}
  	splitOffset = len(line)
  	return
  }
docs: // findValidSplit finds the byte offset to split a string without breaking valid
  // Unicode codepoints given a maximum number of total bytes.  findValidSplit
  // returns the byte offset for splitting a string or []byte, as well as the
  // effective number of bytes if the string were normalized to replace invalid
  // UTF-8 encoded bytes with the Unicode replacement character (a 3-byte UTF-8
  // sequence, represented in Go as utf8.RuneError)