mirror of https://github.com/status-im/consul.git
agent: Add backwards compatibility hack for old 'tag' definitions
This commit is contained in:
parent
6e26f463a5
commit
30307f877b
|
@ -186,6 +186,14 @@ func DecodeServiceDefinition(raw interface{}) (*ServiceDefinition, error) {
|
||||||
if !ok {
|
if !ok {
|
||||||
goto AFTER_FIX
|
goto AFTER_FIX
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If no 'tags', handle the deprecated 'tag' value.
|
||||||
|
if _, ok := rawMap["tags"]; !ok {
|
||||||
|
if tag, ok := rawMap["tag"]; ok {
|
||||||
|
rawMap["tags"] = []interface{}{tag}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub, ok = rawMap["check"]
|
sub, ok = rawMap["check"]
|
||||||
if !ok {
|
if !ok {
|
||||||
goto AFTER_FIX
|
goto AFTER_FIX
|
||||||
|
|
Loading…
Reference in New Issue