From ebaac49142c41dbaac9199099cdf6504246c0960 Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Tue, 27 Nov 2018 22:47:56 +0100 Subject: [PATCH] minor changes from review --- client/tx/search.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/tx/search.go b/client/tx/search.go index 96f3277684..96cd161d24 100644 --- a/client/tx/search.go +++ b/client/tx/search.go @@ -30,7 +30,7 @@ func SearchTxCmd(cdc *codec.Codec) *cobra.Command { Use: "txs", Short: "Search for all transactions that match the given tags.", Long: strings.TrimSpace(` -Search for transactions that match the given tags. For example: +Search for transactions that match exactly the given tags. For example: $ gaiacli query txs --tags :&: `), @@ -38,10 +38,9 @@ $ gaiacli query txs --tags :&: tagsStr := viper.GetString(flagTags) tagsStr = strings.Trim(tagsStr, "'") var tags []string - switch strings.Contains(tagsStr, "&") { - case true: + if strings.Contains(tagsStr, "&") { tags = strings.Split(tagsStr, "&") - case false: + } else { tags = append(tags, tagsStr) }