Skip to content

Conversation

sanbei101
Copy link

rule S1028

S1028 - Simplify error construction with fmt.Errorf
Before:

errors.New(fmt.Sprintf(...))

After:

fmt.Errorf(...)

@jinzhu jinzhu requested a review from Copilot September 15, 2025 05:37
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR simplifies error construction by replacing errors.New(fmt.Sprintf(...)) with the more idiomatic fmt.Errorf(...) pattern, following staticcheck rule S1028.

  • Replaces verbose error construction with the standard Go idiom for formatted errors

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jinzhu
Copy link
Member

jinzhu commented Sep 19, 2025

@copilot fix the test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants