mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00

- use one `cmd.AddCommand(...)` - sort commands - use `GetCmd...` function name style Signed-off-by: Julian Strobl <jmastr@mailbox.org>
37 lines
851 B
Go
37 lines
851 B
Go
package cli
|
|
|
|
import (
|
|
"fmt"
|
|
// "strings"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/cosmos/cosmos-sdk/client"
|
|
// "github.com/cosmos/cosmos-sdk/client/flags"
|
|
// sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/planetmint/planetmint-go/x/asset/types"
|
|
)
|
|
|
|
// GetQueryCmd returns the cli query commands for this module
|
|
func GetQueryCmd(_ string) *cobra.Command {
|
|
// Group asset queries under a subcommand
|
|
cmd := &cobra.Command{
|
|
Use: types.ModuleName,
|
|
Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName),
|
|
DisableFlagParsing: true,
|
|
SuggestionsMinimumDistance: 2,
|
|
RunE: client.ValidateCmd,
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
GetCmdByAddress(),
|
|
GetCmdByCID(),
|
|
GetCmdQueryParams(),
|
|
)
|
|
|
|
// this line is used by starport scaffolding # 1
|
|
|
|
return cmd
|
|
}
|