code: func newEdns0Rule(mode string, args ...string) (Rule, error) {
  	if len(args) < 2 {
  		return nil, fmt.Errorf("too few arguments for an EDNS0 rule")
  	}
  
  	ruleType := strings.ToLower(args[0])
  	action := strings.ToLower(args[1])
  	switch action {
  	case Append:
  	case Replace:
  	case Set:
  	default:
  		return nil, fmt.Errorf("invalid action: %q", action)
  	}
  
  	switch ruleType {
  	case "local":
  		if len(args) != 4 {
  			return nil, fmt.Errorf("EDNS0 local rules require exactly three args")
  		}
  		//Check for variable option
  		if strings.HasPrefix(args[3], "{") && strings.HasSuffix(args[3], "}") {
  			return newEdns0VariableRule(mode, action, args[2], args[3])
  		}
  		return newEdns0LocalRule(mode, action, args[2], args[3])
  	case "nsid":
  		if len(args) != 2 {
  			return nil, fmt.Errorf("EDNS0 NSID rules do not accept args")
  		}
  		return &edns0NsidRule{mode: mode, action: action}, nil
  	case "subnet":
  		if len(args) != 4 {
  			return nil, fmt.Errorf("EDNS0 subnet rules require exactly three args")
  		}
  		return newEdns0SubnetRule(mode, action, args[2], args[3])
  	default:
  		return nil, fmt.Errorf("invalid rule type %q", ruleType)
  	}
  }
docs: // newEdns0Rule creates an EDNS0 rule of the appropriate type based on the args