mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -04:00 
			
		
		
		
	plugin/metadata: some cleanups (#1906)
* plugin/metadata: some cleanups Name to provider.go as that's what being defined right now in the file. Use request.Request because that's done in variables.go anyway. Name the main storage M, because there is no further meaning behind. Remove superfluous methods Signed-off-by: Miek Gieben <miek@miek.nl> * Fix test Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
		| @@ -202,7 +202,8 @@ func (rule *edns0VariableRule) ruleData(ctx context.Context, w dns.ResponseWrite | ||||
| 			} | ||||
| 		} | ||||
| 	} else { // No metadata available means metadata plugin is disabled. Try to get the value directly. | ||||
| 		return variables.GetValue(rule.variable, w, r) | ||||
| 		state := request.Request{W: w, Req: r} // TODO(miek): every rule needs to take a request.Request. | ||||
| 		return variables.GetValue(state, rule.variable) | ||||
| 	} | ||||
| 	return nil, fmt.Errorf("unable to extract data for variable %s", rule.variable) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user