diff options
author | 2018-06-29 15:03:25 +0100 | |
---|---|---|
committer | 2018-06-29 15:03:25 +0100 | |
commit | 2fd31cd3e033161982e19a19bd132d2c5c59ea42 (patch) | |
tree | de66458862f5e73287a0a3f2e2e65c57b8926133 /plugin/rewrite | |
parent | e6c00f39f1043ddd02948a5e011363ed0e6161f9 (diff) | |
download | coredns-2fd31cd3e033161982e19a19bd132d2c5c59ea42.tar.gz coredns-2fd31cd3e033161982e19a19bd132d2c5c59ea42.tar.zst coredns-2fd31cd3e033161982e19a19bd132d2c5c59ea42.zip |
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>
Diffstat (limited to 'plugin/rewrite')
-rw-r--r-- | plugin/rewrite/edns0.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/rewrite/edns0.go b/plugin/rewrite/edns0.go index f8b65d468..2391936c7 100644 --- a/plugin/rewrite/edns0.go +++ b/plugin/rewrite/edns0.go @@ -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) } |