code: func GetSubLines(message string, maxLineLength int) []string {
  	const clippingMessage = " <clipped message>"
  
  	var lines []string
  	for _, line := range strings.Split(strings.TrimSpace(message), "\n") {
  		if maxLineLength == 0 || len([]byte(line)) <= maxLineLength {
  			lines = append(lines, line)
  			continue
  		}
  
  		// !!! WARNING !!!
  		// Before touching the splitting logic below please ensure that you PROPERLY
  		// understand how strings, runes and range loops over strings work in Go.
  		// A good place to start is to read https://blog.golang.org/strings. :-)
  		var splitStart int
  		var startOfPreviousRune int
  		for i := range line {
  			if i-splitStart > maxLineLength-len([]byte(clippingMessage)) {
  				lines = append(lines, line[splitStart:startOfPreviousRune]+clippingMessage)
  				splitStart = startOfPreviousRune
  			}
  			startOfPreviousRune = i
  		}
  		// This last append is safe to do without looking at the remaining byte-length
  		// as we assume that the byte-length of the last rune will never exceed that of
  		// the byte-length of the clipping message.
  		lines = append(lines, line[splitStart:])
  	}
  	return lines
  }
docs: // GetSubLines splits messages in newline-delimited lines. If maxLineLength is
  // specified as non-zero GetSubLines will also clip long lines to the maximum
  // length and insert a warning marker that the line was clipped.
  //
  // TODO: The current implementation has the inconvenient that it disregards
  // word boundaries when splitting but this is hard to solve without potentially
  // breaking formatting and other stylistic effects.