From 679bea1872f7223eb6bb307e54b1da20b6e53c5a Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 17 Oct 2018 13:41:06 +0300 Subject: [PATCH 1/2] Show usage info if '-h' passed without any value --- .travis.yml | 3 +-- common/redis-latency-monitor.spec | 2 +- redis-latency-monitor.go | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54e21d2..f291b0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,8 @@ sudo: required language: go go: - - 1.8.x - - 1.9.x - 1.10.x + - 1.11.x - tip os: diff --git a/common/redis-latency-monitor.spec b/common/redis-latency-monitor.spec index eb3c048..d5ba7b4 100644 --- a/common/redis-latency-monitor.spec +++ b/common/redis-latency-monitor.spec @@ -10,7 +10,7 @@ Summary: Tiny Redis client for latency measurement Name: redis-latency-monitor -Version: 3.0.1 +Version: 3.0.2 Release: 0%{?dist} Group: Applications/System License: EKOL diff --git a/redis-latency-monitor.go b/redis-latency-monitor.go index 5591002..01b6e78 100644 --- a/redis-latency-monitor.go +++ b/redis-latency-monitor.go @@ -34,7 +34,7 @@ import ( // App info const ( APP = "Redis Latency Monitor" - VER = "3.0.1" + VER = "3.0.2" DESC = "Tiny Redis client for latency measurement" ) @@ -64,7 +64,7 @@ const ( // 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_CONNECT: {Type: options.BOOL}, OPT_TIMEOUT: {Type: options.INT, Value: 3, Min: 1, Max: 300}, @@ -114,7 +114,7 @@ func main() { return } - if options.GetB(OPT_HELP) { + if options.GetB(OPT_HELP) || options.GetS(OPT_HOST) == "true" { showUsage() return } From 395b52fca5b59e2a3986f3633e046fd1d679eed2 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Sat, 20 Oct 2018 14:40:53 +0300 Subject: [PATCH 2/2] Fixed spec changelog --- common/redis-latency-monitor.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/redis-latency-monitor.spec b/common/redis-latency-monitor.spec index d5ba7b4..5f1bef1 100644 --- a/common/redis-latency-monitor.spec +++ b/common/redis-latency-monitor.spec @@ -58,6 +58,9 @@ rm -rf %{buildroot} ################################################################################ %changelog +* Sat Oct 20 2018 Anton Novojilov - 3.0.2-0 +- Show usage info if '-h' passed without any value + * Thu Dec 21 2017 Anton Novojilov - 3.0.1-0 - Minor UI fixes