agent: Add backwards compatibility hack for old 'tag' definitions

pull/26/head
Armon Dadgar 11 years ago
parent 6e26f463a5
commit 30307f877b

@ -186,6 +186,14 @@ func DecodeServiceDefinition(raw interface{}) (*ServiceDefinition, error) {
if !ok {
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"]
if !ok {
goto AFTER_FIX

Loading…
Cancel
Save