chore: fix godoc comments for functions and structs (#24736)
This commit is contained in:
+1
-1
@@ -294,7 +294,7 @@ func (ctx Context) WithAux(isAux bool) Context {
|
||||
return ctx
|
||||
}
|
||||
|
||||
// WithLedgerHasProto returns the context with the provided boolean value, indicating
|
||||
// WithLedgerHasProtobuf returns the context with the provided boolean value, indicating
|
||||
// whether the target Ledger application can support Protobuf payloads.
|
||||
func (ctx Context) WithLedgerHasProtobuf(val bool) Context {
|
||||
ctx.LedgerHasProtobuf = val
|
||||
|
||||
@@ -18,7 +18,6 @@ const (
|
||||
DefaultGasLimit = 200000
|
||||
GasFlagAuto = "auto"
|
||||
|
||||
// DefaultKeyringBackend
|
||||
DefaultKeyringBackend = keyring.BackendOS
|
||||
|
||||
// BroadcastSync defines a tx broadcasting mode where the client waits for
|
||||
|
||||
@@ -22,7 +22,7 @@ func NewAddNewKey(name, password, mnemonic string, account, index int) AddNewKey
|
||||
}
|
||||
}
|
||||
|
||||
// RecoverKeyBody recovers a key
|
||||
// RecoverKey is the needed info to recover a key.
|
||||
type RecoverKey struct {
|
||||
Password string `json:"password"`
|
||||
Mnemonic string `json:"mnemonic"`
|
||||
|
||||
+7
-6
@@ -33,11 +33,12 @@ func GetChainHeight(clientCtx client.Context) (int64, error) {
|
||||
//
|
||||
// To tell which events you want, you need to provide a query. query is a
|
||||
// string, which has a form: "condition AND condition ..." (no OR at the
|
||||
// moment). condition has a form: "key operation operand". key is a string with
|
||||
// a restricted set of possible symbols ( \t\n\r\\()"'=>< are not allowed).
|
||||
// operation can be "=", "<", "<=", ">", ">=", "CONTAINS" AND "EXISTS". operand
|
||||
// can be a string (escaped with single quotes), number, date or time.
|
||||
|
||||
//
|
||||
// moment). condition has a form: "key operation operand". key is a string with
|
||||
// a restricted set of possible symbols ( \t\n\r\\()"'=>< are not allowed).
|
||||
// operation can be "=", "<", "<=", ">", ">=", "CONTAINS" AND "EXISTS". operand
|
||||
// can be a string (escaped with single quotes), number, date or time.
|
||||
//
|
||||
// Examples:
|
||||
// tm.event = 'NewBlock' # new blocks
|
||||
// tm.event = 'CompleteProposal' # node got a complete proposal
|
||||
@@ -67,7 +68,7 @@ func QueryBlocks(clientCtx client.Context, page, limit int, query, orderBy strin
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// get block by height
|
||||
// GetBlockByHeight gets a block by height
|
||||
func GetBlockByHeight(clientCtx client.Context, height *int64) (*cmt.Block, error) {
|
||||
// get the node
|
||||
node, err := clientCtx.GetNode()
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ func QueryEventForTxCmd() *cobra.Command {
|
||||
return WaitTxCmd()
|
||||
}
|
||||
|
||||
// WaitTx returns a CLI command that waits for a transaction with the given hash to be included in a block.
|
||||
// WaitTxCmd returns a CLI command that waits for a transaction with the given hash to be included in a block.
|
||||
func WaitTxCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "wait-tx [hash]",
|
||||
|
||||
@@ -165,7 +165,7 @@ func (b *AuxTxBuilder) SetExtensionOptions(extOpts ...*codectypes.Any) {
|
||||
b.auxSignerData.SignDoc.BodyBytes = nil
|
||||
}
|
||||
|
||||
// SetSignature sets the aux signer's signature.
|
||||
// SetNonCriticalExtensionOptions sets the aux signer's signature.
|
||||
func (b *AuxTxBuilder) SetNonCriticalExtensionOptions(extOpts ...*codectypes.Any) {
|
||||
b.checkEmptyFields()
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ var KeyringContextKey struct{}
|
||||
|
||||
var _ Keyring = &KeyringImpl{}
|
||||
|
||||
type KeyringImpl struct {
|
||||
type KeyringImpl struct { //nolint: revive // we can ignore this, as this type is being used
|
||||
k Keyring
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
// later versions unsupported by the current version can be added
|
||||
var buildInfo, _ = debug.ReadBuildInfo()
|
||||
|
||||
// DescriptorName returns the name of the descriptor in kebab case.
|
||||
// DescriptorKebabName returns the name of the descriptor in kebab case.
|
||||
func DescriptorKebabName(descriptor protoreflect.Descriptor) string {
|
||||
return strcase.ToKebab(string(descriptor.Name()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user