Skip to content

Commit

Permalink
Remove unnecessary inline comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chainchad committed Dec 7, 2024
1 parent 89dd71b commit 25864d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/gomod-local-update/internal/updater/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (u *Updater) readModFile() (*modfile.File, error) {

modFile, err := modfile.Parse(goModFile, content, nil)
if err != nil {
return nil, fmt.Errorf("%w: invalid go.mod format: %w", ErrModOperation, err) // Changed %v to %w
return nil, fmt.Errorf("%w: invalid go.mod format: %w", ErrModOperation, err)
}

return modFile, nil
Expand Down
2 changes: 1 addition & 1 deletion tools/gomod-local-update/internal/updater/updater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (m *mockGitExecutor) Command(ctx context.Context, args ...string) ([]byte,
}
remote := args[1]
if remote == "invalid*remote" {
return nil, fmt.Errorf("%w: git remote '%s' contains invalid characters", ErrInvalidConfig, remote) // Fixed: added %w
return nil, fmt.Errorf("%w: git remote '%s' contains invalid characters", ErrInvalidConfig, remote)
}
// Return a full 40-character SHA
fullSHA := fmt.Sprintf("%s%s", m.sha, strings.Repeat("0", 40-len(m.sha)))
Expand Down

0 comments on commit 25864d1

Please sign in to comment.