github.com/cosmos/cosmos-sdk@v0.50.10/x/gov/client/proposal_handler.go (about)

     1  package client
     2  
     3  import (
     4  	"github.com/spf13/cobra"
     5  )
     6  
     7  // function to create the cli handler
     8  type CLIHandlerFn func() *cobra.Command
     9  
    10  // ProposalHandler wraps CLIHandlerFn
    11  type ProposalHandler struct {
    12  	CLIHandler CLIHandlerFn
    13  }
    14  
    15  // NewProposalHandler creates a new ProposalHandler object
    16  func NewProposalHandler(cliHandler CLIHandlerFn) ProposalHandler {
    17  	return ProposalHandler{
    18  		CLIHandler: cliHandler,
    19  	}
    20  }