chore: fix godoc comments for functions and structs (#24736)

This commit is contained in:
Alex | Interchain Labs
2025-05-13 13:48:13 +00:00
committed by GitHub
parent bedfc39334
commit a2d6d1f6ac
141 changed files with 461 additions and 412 deletions
+1 -2
View File
@@ -89,13 +89,11 @@ func KVStoreHandler(storeKey storetypes.StoreKey) bam.MsgServiceHandler {
}
}
// basic KV structure
type KV struct {
Key string `json:"key"`
Value string `json:"value"`
}
// What Genesis JSON is formatted as
type GenesisJSON struct {
Values []KV `json:"values"`
}
@@ -145,6 +143,7 @@ func AppGenStateEmpty(_ *codec.LegacyAmino, _ genutiltypes.AppGenesis, _ []json.
}
// Manually write the handlers for this custom message
type MsgServer interface {
Test(ctx context.Context, msg *KVStoreTx) (*sdk.Result, error)
}
-3
View File
@@ -16,7 +16,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/signing"
)
// An sdk.Tx which is its own sdk.Msg.
type KVStoreTx struct {
key []byte
value []byte
@@ -71,7 +70,6 @@ func (msg *KVStoreTx) Equals(key cryptotypes.PubKey) bool {
panic("implement me")
}
// dummy implementation of proto.Message
func (msg *KVStoreTx) Reset() {}
func (msg *KVStoreTx) String() string { return "TODO" }
func (msg *KVStoreTx) ProtoMessage() {}
@@ -110,7 +108,6 @@ func (msg *KVStoreTx) GetSignBytes() []byte {
return msg.bytes
}
// Should the app be calling this? Or only handlers?
func (msg *KVStoreTx) ValidateBasic() error {
return nil
}
+7 -1
View File
@@ -53,8 +53,9 @@ import (
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
)
// CometBFT full-node start flags
const (
// CometBFT full-node start flags
flagWithComet = "with-comet"
flagAddress = "address"
flagTransport = "transport"
@@ -80,10 +81,12 @@ const (
FlagShutdownGrace = "shutdown-grace"
// state sync-related flags
FlagStateSyncSnapshotInterval = "state-sync.snapshot-interval"
FlagStateSyncSnapshotKeepRecent = "state-sync.snapshot-keep-recent"
// api-related flags
FlagAPIEnable = "api.enable"
FlagAPISwagger = "api.swagger"
FlagAPIAddress = "api.address"
@@ -94,6 +97,7 @@ const (
FlagAPIEnableUnsafeCORS = "api.enabled-unsafe-cors"
// gRPC-related flags
flagGRPCOnly = "grpc-only"
flagGRPCEnable = "grpc.enable"
flagGRPCAddress = "grpc.address"
@@ -101,9 +105,11 @@ const (
flagGRPCSkipCheckHeader = "grpc.skip-check-header"
// mempool flags
FlagMempoolMaxTxs = "mempool.max-txs"
// testnet keys
KeyIsTestnet = "is-testnet"
KeyNewChainID = "new-chain-ID"
KeyNewOpAddr = "new-operator-addr"
+2 -2
View File
@@ -44,7 +44,6 @@ import (
// a command's Context.
const ServerContextKey = sdk.ContextKey("server.context")
// server context
type Context struct {
Viper *viper.Viper
Config *cmtcfg.Config
@@ -311,7 +310,6 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo
return conf, nil
}
// add server commands
func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator types.AppCreator, appExport types.AppExporter, addStartFlags types.ModuleInitFlags) {
cometCmd := &cobra.Command{
Use: "comet",
@@ -378,6 +376,8 @@ func AddTestnetCreatorCommand(rootCmd *cobra.Command, appCreator types.AppCreato
rootCmd.AddCommand(testnetCreateCmd)
}
// ExternalIP gets the external IP address of the machine.
//
// https://stackoverflow.com/questions/23558425/how-do-i-get-the-local-ip-address-in-go
// TODO there must be a better way to get external IP
func ExternalIP() (string, error) {