fix(query): unknown flag: --page (#471)

some query commands use pagination when delivering results:
```
pageReq, err := client.ReadPageRequest(cmd.Flags())
if err != nil {
    return err
}
```
to be able to use this feature, we need to add pagination related flags
to the `cmd`.

* chore(lint): exclude query files from `dupl`

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
Julian Strobl 2024-11-14 09:52:06 +01:00 committed by GitHub
parent 67453107d1
commit 6ddc07356e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 0 deletions

View File

@ -91,6 +91,9 @@ issues:
- path: x/.*/types/message.*\.go - path: x/.*/types/message.*\.go
linters: linters:
- dupl - dupl
- path: x/dao/client/cli/query_.*\.go
linters:
- dupl
- path: x/dao/client/cli/tx_reissue_rddl.*\.go - path: x/dao/client/cli/tx_reissue_rddl.*\.go
linters: linters:
- dupl - dupl

View File

@ -52,6 +52,7 @@ func GetCmdByAddress() *cobra.Command {
}, },
} }
flags.AddPaginationFlagsToCmd(cmd, cmd.Use)
flags.AddQueryFlagsToCmd(cmd) flags.AddQueryFlagsToCmd(cmd)
return cmd return cmd

View File

@ -41,6 +41,7 @@ func GetCmdChallenges() *cobra.Command {
}, },
} }
flags.AddPaginationFlagsToCmd(cmd, cmd.Use)
flags.AddQueryFlagsToCmd(cmd) flags.AddQueryFlagsToCmd(cmd)
return cmd return cmd

View File

@ -41,6 +41,7 @@ func GetCmdReissuances() *cobra.Command {
}, },
} }
flags.AddPaginationFlagsToCmd(cmd, cmd.Use)
flags.AddQueryFlagsToCmd(cmd) flags.AddQueryFlagsToCmd(cmd)
return cmd return cmd