Skip to content

Commit 8d6f603

Browse files
committed
Fix gofmt, gofumpt, perfsprint, and staticcheck lint issues
1 parent e49fcab commit 8d6f603

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

experimental/aitools/cmd/install_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package aitools
22

33
import (
4-
"context"
54
"bufio"
5+
"context"
66
"os"
77
"path/filepath"
88
"testing"

experimental/aitools/cmd/skills.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ package aitools
22

33
import (
44
"context"
5-
"fmt"
5+
"errors"
6+
67
"github.com/charmbracelet/huh"
78
"github.com/databricks/cli/experimental/aitools/lib/agents"
89
"github.com/databricks/cli/experimental/aitools/lib/installer"
@@ -13,7 +14,7 @@ import (
1314

1415
// Package-level vars for testability.
1516
var (
16-
promptAgentSelection = defaultPromptAgentSelection
17+
promptAgentSelection = defaultPromptAgentSelection
1718
installSkillsForAgentsFn = installer.InstallSkillsForAgents
1819
)
1920

@@ -37,7 +38,7 @@ func defaultPromptAgentSelection(ctx context.Context, detected []*agents.Agent)
3738
}
3839

3940
if len(selected) == 0 {
40-
return nil, fmt.Errorf("at least one agent must be selected")
41+
return nil, errors.New("at least one agent must be selected")
4142
}
4243

4344
result := make([]*agents.Agent, 0, len(selected))

experimental/aitools/lib/installer/installer_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,8 @@ func TestLegacyDetectLegacyDir(t *testing.T) {
481481
}
482482

483483
func TestInstallAllSkillsSignaturePreserved(t *testing.T) {
484-
// Compile-time check that InstallAllSkills satisfies func(context.Context) error.
485-
var fn func(context.Context) error = InstallAllSkills
486-
_ = fn
484+
// Compile-time check that InstallAllSkills matches the expected signature.
485+
// cmd/apps/init.go passes this as func(context.Context) error.
486+
callback := func(fn func(context.Context) error) { _ = fn }
487+
callback(InstallAllSkills)
487488
}

0 commit comments

Comments
 (0)