Skip to content

Commit 0284cdc

Browse files
committed
refactor(helm): rename some list function
1 parent 8a4c392 commit 0284cdc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pkg/helm/helm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ func NewHelm(kubernetes Kubernetes, namespace string) *Helm {
2626
return &Helm{kubernetes: kubernetes}
2727
}
2828

29-
// ReleasesList lists all the releases for the specified namespace (or current namespace if). Or allNamespaces is true, it lists all releases across all namespaces.
30-
func (h *Helm) ReleasesList(namespace string, allNamespaces bool) (string, error) {
29+
// List lists all the releases for the specified namespace (or current namespace if). Or allNamespaces is true, it lists all releases across all namespaces.
30+
func (h *Helm) List(namespace string, allNamespaces bool) (string, error) {
3131
cfg := new(action.Configuration)
3232
applicableNamespace := ""
3333
if !allNamespaces {

pkg/mcp/helm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (s *Server) helmList(_ context.Context, ctr mcp.CallToolRequest) (*mcp.Call
2929
if v, ok := ctr.Params.Arguments["namespace"].(string); ok {
3030
namespace = v
3131
}
32-
ret, err := s.k.Helm.ReleasesList(namespace, allNamespaces)
32+
ret, err := s.k.Helm.List(namespace, allNamespaces)
3333
if err != nil {
3434
return NewTextResult("", fmt.Errorf("failed to list helm releases in namespace '%s': %w", namespace, err)), nil
3535
}

pkg/mcp/helm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func TestHelmList(t *testing.T) {
2626
t.Fatalf("unexpected result %v", toolResult.Content[0].(mcp.TextContent).Text)
2727
}
2828
})
29-
_, err = kc.CoreV1().Secrets("default").Create(c.ctx, &corev1.Secret{
29+
_, _ = kc.CoreV1().Secrets("default").Create(c.ctx, &corev1.Secret{
3030
ObjectMeta: metav1.ObjectMeta{
3131
Name: "release-to-list",
3232
Labels: map[string]string{"owner": "helm"},

0 commit comments

Comments
 (0)