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