mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: update golang to 1.24.1 (#17035)
- Update go.mod to use Go 1.24.1 - Update GitHub Actions setup-go action to use Go 1.24.1 - Fix linting issues with golangci-lint by: - Updating to golangci-lint v1.57.1 (more compatible with Go 1.24.1) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com>
This commit is contained in:
@ -16,7 +16,7 @@ func (RootCmd) errorExample() *serpent.Command {
|
||||
errorCmd := func(use string, err error) *serpent.Command {
|
||||
return &serpent.Command{
|
||||
Use: use,
|
||||
Handler: func(inv *serpent.Invocation) error {
|
||||
Handler: func(_ *serpent.Invocation) error {
|
||||
return err
|
||||
},
|
||||
}
|
||||
@ -70,7 +70,7 @@ func (RootCmd) errorExample() *serpent.Command {
|
||||
// A multi-error
|
||||
{
|
||||
Use: "multi-error",
|
||||
Handler: func(inv *serpent.Invocation) error {
|
||||
Handler: func(_ *serpent.Invocation) error {
|
||||
return xerrors.Errorf("wrapped: %w", errors.Join(
|
||||
xerrors.Errorf("first error: %w", errorWithStackTrace()),
|
||||
xerrors.Errorf("second error: %w", errorWithStackTrace()),
|
||||
@ -81,7 +81,7 @@ func (RootCmd) errorExample() *serpent.Command {
|
||||
{
|
||||
Use: "multi-multi-error",
|
||||
Short: "This is a multi error inside a multi error",
|
||||
Handler: func(inv *serpent.Invocation) error {
|
||||
Handler: func(_ *serpent.Invocation) error {
|
||||
return errors.Join(
|
||||
xerrors.Errorf("parent error: %w", errorWithStackTrace()),
|
||||
errors.Join(
|
||||
@ -100,7 +100,7 @@ func (RootCmd) errorExample() *serpent.Command {
|
||||
Required: true,
|
||||
Flag: "magic-word",
|
||||
Default: "",
|
||||
Value: serpent.Validate(&magicWord, func(value *serpent.String) error {
|
||||
Value: serpent.Validate(&magicWord, func(_ *serpent.String) error {
|
||||
return xerrors.Errorf("magic word is incorrect")
|
||||
}),
|
||||
},
|
||||
|
Reference in New Issue
Block a user