code: func (rule *edns0SubnetRule) Rewrite(w dns.ResponseWriter, r *dns.Msg) Result {
  	result := RewriteIgnored
  	o := setupEdns0Opt(r)
  	found := false
  	for _, s := range o.Option {
  		switch e := s.(type) {
  		case *dns.EDNS0_SUBNET:
  			if rule.action == Replace || rule.action == Set {
  				if rule.fillEcsData(w, r, e) == nil {
  					result = RewriteDone
  				}
  			}
  			found = true
  			break
  		}
  	}
  
  	// add option if not found
  	if !found && (rule.action == Append || rule.action == Set) {
  		o.SetDo()
  		opt := dns.EDNS0_SUBNET{Code: dns.EDNS0SUBNET}
  		if rule.fillEcsData(w, r, &opt) == nil {
  			o.Option = append(o.Option, &opt)
  			result = RewriteDone
  		}
  	}
  
  	return result
  }
docs: // Rewrite will alter the request EDNS0 subnet option