Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions x/storage/keeper/active_deals.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/jackalLabs/canine-chain/v5/x/storage/types"
)

// SetActiveDeals set a specific activeDeals in the store from its index
// SetLegacyActiveDeals set a specific activeDeals in the store from its index

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Consider improving godoc grammar while editing this line.

Since you're already updating this comment, consider these optional improvements to align with Go documentation conventions:

  • Change "set" to "sets" (godoc convention uses present tense, third person)
  • Change "a activeDeals" to "an activeDeals" (grammatical correctness)
✍️ Proposed documentation improvement
-// SetLegacyActiveDeals set a specific activeDeals in the store from its index
+// SetLegacyActiveDeals sets a specific activeDeals in the store from its index
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// SetLegacyActiveDeals set a specific activeDeals in the store from its index
// SetLegacyActiveDeals sets a specific activeDeals in the store from its index
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@x/storage/keeper/active_deals.go` at line 10, Update the godoc comment for
the function SetLegacyActiveDeals to use correct grammar and Go doc conventions:
change "SetLegacyActiveDeals set a specific activeDeals in the store from its
index" to present-tense third-person and fix the article (e.g.,
"SetLegacyActiveDeals sets a specific activeDeals in the store from its index"
or better "SetLegacyActiveDeals sets a specific activeDeals entry in the store
using its index"). Ensure the comment starts with the function name
"SetLegacyActiveDeals" and reflects the function purpose concisely.

func (k Keeper) SetLegacyActiveDeals(ctx sdk.Context, activeDeals types.LegacyActiveDeals) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LegacyActiveDealsKeyPrefix))
b := k.cdc.MustMarshal(&activeDeals)
Expand Down Expand Up @@ -45,7 +45,7 @@ func (k Keeper) RemoveLegacyActiveDeals(
))
}

// GetAllActiveDeals returns all activeDeals
// GetAllLegacyActiveDeals returns all activeDeals
func (k Keeper) GetAllLegacyActiveDeals(ctx sdk.Context) (list []types.LegacyActiveDeals) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LegacyActiveDealsKeyPrefix))
iterator := sdk.KVStorePrefixIterator(store, []byte{})
Expand Down