diff --git a/redis/redis.go b/redis/redis.go index fb5759e..f7f22e8 100644 --- a/redis/redis.go +++ b/redis/redis.go @@ -30,7 +30,12 @@ func (m *RedisMatcher) Vendor(matchCtx *osm.MatchCtx) string { } func (m *RedisMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" + v := "UNKNOWN" + if _v, ok := matchCtx.GetAttribute("redis_version"); ok { + v = _v + } + + return v } func (m *RedisMatcher) OsType(matchCtx *osm.MatchCtx) string { @@ -53,9 +58,7 @@ func (m *RedisMatcher) Name(matchCtx *osm.MatchCtx) string { if v, ok := matchCtx.GetAttribute("redis_mode"); ok { name = name + " " + v } - if v, ok := matchCtx.GetAttribute("redis_version"); ok { - name = name + " (" + v + ")" - } + return name }