diff --git a/collections/iter.go b/collections/iter.go index 06f2a9f960..ea87082a26 100644 --- a/collections/iter.go +++ b/collections/iter.go @@ -204,7 +204,7 @@ func newIterator[K, V any](ctx context.Context, start, end []byte, order Order, }, nil } -// Iterator defines a generic wrapper around an storetypes.Iterator. +// Iterator defines a generic wrapper around a storetypes.Iterator. // This iterator provides automatic key and value encoding, // it assumes all the keys and values contained within the storetypes.Iterator // range are the same. diff --git a/core/appmodule/v2/doc.go b/core/appmodule/v2/doc.go index 4953f90ac4..64293fe977 100644 --- a/core/appmodule/v2/doc.go +++ b/core/appmodule/v2/doc.go @@ -1,3 +1,3 @@ -// Package appmodule defines what is needed for an module to be used in the Cosmos SDK (runtime/v2). +// Package appmodule defines what is needed for a module to be used in the Cosmos SDK (runtime/v2). // If you are looking at integrating dependency injection into your module please see depinject appconfig documentation. package appmodulev2 diff --git a/depinject/group.go b/depinject/group.go index 5ecb519f00..e6d0080123 100644 --- a/depinject/group.go +++ b/depinject/group.go @@ -83,7 +83,7 @@ func (g *sliceGroupResolver) resolve(c *container, _ *moduleKey, caller Location } func (g *groupResolver) resolve(_ *container, _ *moduleKey, _ Location) (reflect.Value, error) { - return reflect.Value{}, fmt.Errorf("%v is an many-per-container type and cannot be used as an input value, instead use %v", g.typ, g.sliceType) + return reflect.Value{}, fmt.Errorf("%v is a many-per-container type and cannot be used as an input value, instead use %v", g.typ, g.sliceType) } func (g *groupResolver) addNode(n *simpleProvider, i int) error { diff --git a/docs/spec/store/README.md b/docs/spec/store/README.md index 7b977b841b..1210b9abd2 100644 --- a/docs/spec/store/README.md +++ b/docs/spec/store/README.md @@ -31,7 +31,7 @@ prefix-based iteration, including reverse iteration. Typically, each module has its own dedicated `KVStore` instance, which it can get access to via the `sdk.Context` and the use of a pointer-based named key -- -`KVStoreKey`. The `KVStoreKey` provides pseudo-OCAP. How a exactly a `KVStoreKey` +`KVStoreKey`. The `KVStoreKey` provides pseudo-OCAP. How an exactly a `KVStoreKey` maps to a `KVStore` will be illustrated below through the `CommitMultiStore`. Note, a `KVStore` cannot directly commit state. Instead, a `KVStore` can be wrapped diff --git a/errors/errors.go b/errors/errors.go index 1255e88003..c859e78da9 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -105,7 +105,7 @@ func (e Error) Codespace() string { // it will be labeled as internal error. // // If err is nil, this returns nil, avoiding the need for an if statement when -// wrapping a error returned at the end of a function +// wrapping an error returned at the end of a function func Wrap(err error, description string) error { if err == nil { return nil diff --git a/orm/model/ormtable/hooks.go b/orm/model/ormtable/hooks.go index c5a76a6af8..1c2aedb6dc 100644 --- a/orm/model/ormtable/hooks.go +++ b/orm/model/ormtable/hooks.go @@ -29,7 +29,7 @@ type ValidateHooks interface { // may be called but the enclosing transaction may still fail. The context // is provided in each method to help coordinate this. type WriteHooks interface { - // OnInsert is called after an message is inserted into the store. + // OnInsert is called after a message is inserted into the store. OnInsert(context.Context, proto.Message) // OnUpdate is called after the entity is updated in the store. diff --git a/runtime/events.go b/runtime/events.go index e2345699d1..43584d2c6f 100644 --- a/runtime/events.go +++ b/runtime/events.go @@ -32,7 +32,7 @@ func NewEventManager(ctx context.Context) event.Manager { return &Events{sdkCtx.EventManager()} } -// Emit emits an typed event that is defined in the protobuf file. +// Emit emits a typed event that is defined in the protobuf file. // In the future these events will be added to consensus. func (e Events) Emit(event gogoproto.Message) error { return e.EventManagerI.EmitTypedEvent(event) diff --git a/server/v2/stf/core_event_service.go b/server/v2/stf/core_event_service.go index 182848db45..641a789b9e 100644 --- a/server/v2/stf/core_event_service.go +++ b/server/v2/stf/core_event_service.go @@ -36,7 +36,7 @@ type eventManager struct { executionContext *executionContext } -// Emit emits an typed event that is defined in the protobuf file. +// Emit emits a typed event that is defined in the protobuf file. // In the future these events will be added to consensus. func (em *eventManager) Emit(tev transaction.Msg) error { ev := event.Event{ diff --git a/store/cachekv/store_test.go b/store/cachekv/store_test.go index de03b04ba3..168b06e501 100644 --- a/store/cachekv/store_test.go +++ b/store/cachekv/store_test.go @@ -465,7 +465,7 @@ func randInt(n int) int { return unsafe.NewRand().Int() % n } -// useful for replaying a error case if we find one +// useful for replaying an error case if we find one func doOp(t *testing.T, st types.CacheKVStore, truth corestore.KVStoreWithBatch, op int, args ...int) { t.Helper() switch op { diff --git a/store/snapshots/helpers_test.go b/store/snapshots/helpers_test.go index b34f90dd6a..c706e101f8 100644 --- a/store/snapshots/helpers_test.go +++ b/store/snapshots/helpers_test.go @@ -62,7 +62,7 @@ func readChunks(chunks <-chan io.ReadCloser) [][]byte { return bodies } -// snapshotItems serialize a array of bytes as SnapshotItem_ExtensionPayload, and return the chunks. +// snapshotItems serialize an array of bytes as SnapshotItem_ExtensionPayload, and return the chunks. func snapshotItems(items [][]byte, ext snapshottypes.ExtensionSnapshotter) [][]byte { // copy the same parameters from the code snapshotChunkSize := uint64(10e6) diff --git a/store/v2/snapshots/helpers_test.go b/store/v2/snapshots/helpers_test.go index 40090c8968..164fd0fe84 100644 --- a/store/v2/snapshots/helpers_test.go +++ b/store/v2/snapshots/helpers_test.go @@ -59,7 +59,7 @@ func readChunks(chunks <-chan io.ReadCloser) [][]byte { return bodies } -// snapshotItems serialize a array of bytes as SnapshotItem_ExtensionPayload, and return the chunks. +// snapshotItems serialize an array of bytes as SnapshotItem_ExtensionPayload, and return the chunks. func snapshotItems(items [][]byte, ext snapshots.ExtensionSnapshotter) [][]byte { // copy the same parameters from the code snapshotChunkSize := uint64(10e6) diff --git a/x/auth/types/account.go b/x/auth/types/account.go index ccdff26912..5b6499b513 100644 --- a/x/auth/types/account.go +++ b/x/auth/types/account.go @@ -158,7 +158,7 @@ func NewModuleAddress(name string) sdk.AccAddress { return address.Module(name) } -// NewEmptyModuleAccount creates a empty ModuleAccount from a string +// NewEmptyModuleAccount creates an empty ModuleAccount from a string func NewEmptyModuleAccount(name string, permissions ...string) *ModuleAccount { moduleAddress := NewModuleAddress(name) baseAcc := NewBaseAccountWithAddress(moduleAddress) diff --git a/x/group/internal/orm/iterator.go b/x/group/internal/orm/iterator.go index 709a7f7a82..8004d60101 100644 --- a/x/group/internal/orm/iterator.go +++ b/x/group/internal/orm/iterator.go @@ -103,7 +103,7 @@ func First(it Iterator, dest proto.Message) (RowID, error) { // Paginate does pagination with a given Iterator based on the provided // PageRequest and unmarshals the results into the dest interface that must be -// an non-nil pointer to a slice. +// a non-nil pointer to a slice. // // If pageRequest is nil, then we will use these default values: // - Offset: 0