cli: refactor flag reading (#6884)

* cli: refactor ReadPersistentCommandFlags

* updates

* fix tetts

* cover all cases

* fix tests

* fix tests

* fix tests

* fix tests

* godoc++

Co-authored-by: Aaron Craelius <aaron@regen.network>
This commit is contained in:
Alexander Bezobchuk
2020-07-30 16:44:22 +00:00
committed by GitHub
co-authored by Aaron Craelius
parent eb08781e8a
commit 9ccec075e2
7 changed files with 119 additions and 74 deletions
+2 -1
View File
@@ -49,9 +49,10 @@ func (s *IntegrationTestSuite) TestNewQuerySubspaceParamsCmd() {
expectedOutput string
}{
{
"default output",
"json output",
[]string{
"staking", "MaxValidators",
fmt.Sprintf("--%s=json", tmcli.OutputFlag),
},
`{"subspace":"staking","key":"MaxValidators","value":"100"}`,
},