From f77713de2a916be5f2b47580a1f4136d1f6c10cd Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 23 Oct 2018 13:54:50 +0900 Subject: [PATCH] ing --- redis/redis.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 }