Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/port/portutil/portutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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
Expand Down