code: func (d *DNSServer) trimDNSResponse(cfg *dnsConfig, network string, req, resp *dns.Msg) (trimmed bool) {
  	if network != "tcp" {
  		trimmed = trimUDPResponse(req, resp, cfg.UDPAnswerLimit)
  	} else {
  		trimmed = d.trimTCPResponse(req, resp)
  	}
  	// Flag that there are more records to return in the UDP response
  	if trimmed && cfg.EnableTruncate {
  		resp.Truncated = true
  	}
  	return trimmed
  }
docs: // trimDNSResponse will trim the response for UDP and TCP