Skip to content

Commit 441f65f

Browse files
authored
Merge branch 'main' into dependabot/go_modules/security-2352ec8c16
2 parents ec7eb9a + 73ac499 commit 441f65f

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

.github/workflows/upgrade-go.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Upgrade Go Version
2+
3+
on:
4+
# Run manually when needed
5+
workflow_dispatch:
6+
# Run weekly on Mondays at 8am UTC
7+
schedule:
8+
- cron: "0 8 * * MON"
9+
10+
jobs:
11+
upgrade-go:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v5
19+
20+
- name: Check for Go updates
21+
uses: StefMa/Upgrade-Go-Action@v1
22+
with:
23+
base-branch: 'main'
24+
gh-token: ${{ secrets.TROUBLESHOOT_GH_PAT }}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/replicatedhq/troubleshoot
22

3-
go 1.24.6
3+
go 1.25.4
44

55
require (
66
github.com/Masterminds/sprig/v3 v3.3.0

pkg/namespaces/namespace-pinger.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package namespaces
55
import (
66
"fmt"
77
"net"
8+
"strconv"
89
"time"
910
)
1011

@@ -51,7 +52,7 @@ func (n *NamespacePinger) PingUDP(dst net.IP) error {
5152
func (n *NamespacePinger) PingTCP(dst net.IP) error {
5253
n.cfg.Logf("reaching to %q from %q with tcp", dst, n.InternalIP)
5354
pinger := func() error {
54-
addr := fmt.Sprintf("%s:%d", dst, n.cfg.Port)
55+
addr := net.JoinHostPort(dst.String(), strconv.Itoa(n.cfg.Port))
5556
conn, err := net.DialTimeout("tcp", addr, n.cfg.Timeout)
5657
if err != nil {
5758
return fmt.Errorf("error dialing tcp: %w", err)
@@ -90,7 +91,7 @@ func (n *NamespacePinger) StartTCPEchoServer(errors chan error) {
9091
// received, the server ends. Callers must wait until the ready channel is
9192
// closed before they can start sending packets.
9293
func (n *NamespacePinger) startTCPEchoServer(ready chan struct{}) (err error) {
93-
addr := fmt.Sprintf("%s:%d", n.InternalIP, n.cfg.Port)
94+
addr := net.JoinHostPort(n.InternalIP.String(), strconv.Itoa(n.cfg.Port))
9495
n.cfg.Logf("starting tcp echo server on namespace %q(%q)", n.name, addr)
9596

9697
if err = n.Join(); err != nil {

0 commit comments

Comments
 (0)