Rename Tags to TagKeys
This commit is contained in:
parent
e9356c893b
commit
d35c78e933
|
@ -22,7 +22,7 @@ type Service struct {
|
||||||
Name string
|
Name string
|
||||||
Servers []string
|
Servers []string
|
||||||
Method string
|
Method string
|
||||||
Tags []string
|
TagKeys []string
|
||||||
Parameters map[string]string
|
Parameters map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,10 +63,10 @@ var sampleConfig = `
|
||||||
method = "GET"
|
method = "GET"
|
||||||
|
|
||||||
# List of tag names to extract from server response
|
# List of tag names to extract from server response
|
||||||
tags = [
|
# tagKeys = [
|
||||||
"my_tag_1",
|
# "my_tag_1",
|
||||||
"my_tag_2"
|
# "my_tag_2"
|
||||||
]
|
# ]
|
||||||
|
|
||||||
# HTTP parameters (all values must be strings)
|
# HTTP parameters (all values must be strings)
|
||||||
[httpjson.services.parameters]
|
[httpjson.services.parameters]
|
||||||
|
@ -142,7 +142,7 @@ func (h *HttpJson) gatherServer(acc plugins.Accumulator, service Service, server
|
||||||
"server": serverURL,
|
"server": serverURL,
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tag := range service.Tags {
|
for _, tag := range service.TagKeys {
|
||||||
switch v := jsonOut[tag].(type) {
|
switch v := jsonOut[tag].(type) {
|
||||||
case string:
|
case string:
|
||||||
tags[tag] = v
|
tags[tag] = v
|
||||||
|
|
|
@ -104,7 +104,7 @@ func genMockHttpJson(response string, statusCode int) *HttpJson {
|
||||||
"httpParam1": "12",
|
"httpParam1": "12",
|
||||||
"httpParam2": "the second parameter",
|
"httpParam2": "the second parameter",
|
||||||
},
|
},
|
||||||
Tags: []string{
|
TagKeys: []string{
|
||||||
"role",
|
"role",
|
||||||
"build",
|
"build",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue