code: func (rule *edns0LocalRule) 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_LOCAL:
  			if rule.code == e.Code {
  				if rule.action == Replace || rule.action == Set {
  					e.Data = rule.data
  					result = RewriteDone
  				}
  				found = true
  				break
  			}
  		}
  	}
  
  	// add option if not found
  	if !found && (rule.action == Append || rule.action == Set) {
  		o.SetDo()
  		var opt dns.EDNS0_LOCAL
  		opt.Code = rule.code
  		opt.Data = rule.data
  		o.Option = append(o.Option, &opt)
  		result = RewriteDone
  	}
  
  	return result
  }
docs: // Rewrite will alter the request EDNS0 local options