From 7227db7445aadab5dc42557d527e30d730a796c7 Mon Sep 17 00:00:00 2001 From: Hayato Kiwata Date: Sat, 25 Jul 2026 14:02:16 +0900 Subject: [PATCH] fix: correct field names in ParsePortSpec error messages Signed-off-by: Hayato Kiwata --- pkg/port/portutil/portutil.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/port/portutil/portutil.go b/pkg/port/portutil/portutil.go index e1a1ae48..b7da7282 100644 --- a/pkg/port/portutil/portutil.go +++ b/pkg/port/portutil/portutil.go @@ -94,7 +94,7 @@ func ParsePortSpec(portSpec string) (*port.Spec, error) { return nil, fmt.Errorf("unexpected ParentIP in PortSpec string: %q", portSpec) } if parts[childIP] != "" && net.ParseIP(parts[childIP]) == nil { - return nil, fmt.Errorf("unexpected ParentIP in PortSpec string: %q", portSpec) + return nil, fmt.Errorf("unexpected ChildIP in PortSpec string: %q", portSpec) } ps := &port.Spec{ @@ -105,12 +105,12 @@ func ParsePortSpec(portSpec string) (*port.Spec, error) { ps.ParentPort, err = strconv.Atoi(parts[parentPort]) if err != nil { - return nil, fmt.Errorf("unexpected ChildPort in PortSpec string: %q: %w", portSpec, err) + return nil, fmt.Errorf("unexpected ParentPort in PortSpec string: %q: %w", portSpec, err) } ps.ChildPort, err = strconv.Atoi(parts[childPort]) if err != nil { - return nil, fmt.Errorf("unexpected ParentPort in PortSpec string: %q: %w", portSpec, err) + return nil, fmt.Errorf("unexpected ChildPort in PortSpec string: %q: %w", portSpec, err) } return ps, nil