code: func formatNano(nanosec uint, n int, trim bool) []byte {
  	u := nanosec
  	var buf [9]byte
  	for start := len(buf); start > 0; {
  		start--
  		buf[start] = byte(u%10 + '0')
  		u /= 10
  	}
  
  	if n > 9 {
  		n = 9
  	}
  	if trim {
  		for n > 0 && buf[n-1] == '0' {
  			n--
  		}
  		if n == 0 {
  			return buf[:0]
  		}
  	}
  	return buf[:n]
  }
docs: // A load from pkg/time/format.go of golang source code.
  // formatNano appends a fractional second, as nanoseconds, to b
  // and returns the result.