code: func isPrettyPrint(req *http.Request) bool {
  	// DEPRECATED: should be part of the content type
  	if req.URL != nil {
  		// avoid an allocation caused by parsing the URL query
  		if strings.Contains(req.URL.RawQuery, "pretty") {
  			pp := req.URL.Query().Get("pretty")
  			if len(pp) > 0 {
  				pretty, _ := strconv.ParseBool(pp)
  				return pretty
  			}
  		}
  	}
  	userAgent := req.UserAgent()
  	// This covers basic all browsers and cli http tools
  	if strings.HasPrefix(userAgent, "curl") || strings.HasPrefix(userAgent, "Wget") || strings.HasPrefix(userAgent, "Mozilla/5.0") {
  		return true
  	}
  	return false
  }
docs: // isPrettyPrint returns true if the "pretty" query parameter is true or if the User-Agent
  // matches known "human" clients.