This commit is contained in:
crusader 2018-10-23 13:54:50 +09:00
parent bce329e44e
commit f77713de2a

View File

@ -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
}