docs: Correct grammar errors across multiple files (#23074)

Co-authored-by: Marko <marko@baricevic.me>
Co-authored-by: Alex | Skip <alex@skip.money>
This commit is contained in:
Marco 2025-01-06 10:31:06 +02:00 committed by GitHub
parent 93282e101d
commit 24580eae9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 13 additions and 13 deletions

View File

@ -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.

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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)

View File

@ -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{

View File

@ -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 {

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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