diff --git a/.travis.yml b/.travis.yml index de1c860..e46399d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ sudo: required language: go go: - - 1.8.x - - 1.9.x - 1.10.x - 1.11.x - tip diff --git a/common/redis-monitor-top.spec b/common/redis-monitor-top.spec index 923c5ff..481d4a6 100644 --- a/common/redis-monitor-top.spec +++ b/common/redis-monitor-top.spec @@ -10,7 +10,7 @@ Summary: Tiny Redis client for monitor command output top Name: redis-monitor-top -Version: 1.2.1 +Version: 1.2.2 Release: 0%{?dist} Group: Applications/System License: EKOL @@ -20,7 +20,7 @@ Source0: https://source.kaos.io/%{name}/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: golang >= 1.8 +BuildRequires: golang >= 1.11 Provides: %{name} = %{version}-%{release} @@ -57,6 +57,9 @@ rm -rf %{buildroot} ################################################################################ %changelog +* Sat Oct 20 2018 Anton Novojilov - 1.2.2-0 +- Show usage info if '-h' passed without any value + * Wed Sep 19 2018 Anton Novojilov - 1.2.1-0 - Code refactoring diff --git a/redis-monitor-top.go b/redis-monitor-top.go index 184e145..cb44b3f 100644 --- a/redis-monitor-top.go +++ b/redis-monitor-top.go @@ -33,7 +33,7 @@ import ( const ( APP = "Redis Monitor Top" - VER = "1.2.1" + VER = "1.2.2" DESC = "Tiny Redis client for aggregating stats from MONITOR flow" ) @@ -76,7 +76,7 @@ type Stats struct { // optMap is map with options var optMap = options.Map{ - OPT_HOST: {Value: "127.0.0.1"}, + OPT_HOST: {Type: options.MIXED, Value: "127.0.0.1"}, OPT_PORT: {Value: "6379"}, OPT_TIMEOUT: {Type: options.INT, Value: 3, Min: 1, Max: 300}, OPT_AUTH: {}, @@ -114,7 +114,7 @@ func main() { return } - if options.GetB(OPT_HELP) { + if options.GetB(OPT_HELP) || options.GetS(OPT_HOST) == "true" { showUsage() return }