Skip to content

Commit fa005ec

Browse files
committed
Fix remaining golangci-lint errors
- Use strconv.Itoa instead of fmt.Sprintf for int conversion (perfsprint) - Use string concatenation for svc/ prefix (perfsprint) - Remove trailing blank line in portforward.go (gofmt) Made-with: Cursor
1 parent cac620d commit fa005ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

deploy/multimodel/deployer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"os"
77
"os/exec"
8+
"strconv"
89
"strings"
910
"sync"
1011

@@ -25,7 +26,7 @@ type Deployer struct {
2526
func (d *Deployer) Deploy(ctx context.Context) error {
2627
totalSteps := len(d.cfg.Models) + 3 // N models + Gateway + HTTPRoute + Verify
2728

28-
logInfo("Models to deploy (" + fmt.Sprintf("%d", len(d.cfg.Models)) + "): " + modelNames(d.cfg.Models))
29+
logInfo("Models to deploy (" + strconv.Itoa(len(d.cfg.Models)) + "): " + modelNames(d.cfg.Models))
2930
logInfo("Resource slugs: " + modelSlugs(d.cfg.Models))
3031

3132
// Step 1: Deploy first model with full control plane

deploy/multimodel/portforward.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func newPortForwarder(_ *kubernetes.Clientset, namespace, serviceName string, re
2727

2828
cmd := exec.Command("kubectl", "port-forward",
2929
"-n", namespace,
30-
fmt.Sprintf("svc/%s", serviceName),
30+
"svc/"+serviceName,
3131
fmt.Sprintf("%d:%d", localPort, remotePort),
3232
)
3333

@@ -84,4 +84,3 @@ func httpGetStatus(url string) int {
8484
defer resp.Body.Close()
8585
return resp.StatusCode
8686
}
87-

0 commit comments

Comments
 (0)