code: func maybeTruncateUserAgent(req *http.Request) string {
  	ua := req.UserAgent()
  	if len(ua) > maxUserAgentLength {
  		ua = ua[:maxUserAgentLength] + userAgentTruncateSuffix
  	}
  
  	return ua
  }
docs: // truncate User-Agent if too long, otherwise return it directly.