MCPcopy Index your code
hub / github.com/cli/cli / IsInternalPort

Function IsInternalPort

internal/codespaces/portforwarder/port_forwarder.go:387–395  ·  view source on GitHub ↗

IsInternalPort returns true if the port is internal.

(port *tunnels.TunnelPort)

Source from the content-addressed store, hash-verified

385
386// IsInternalPort returns true if the port is internal.
387func IsInternalPort(port *tunnels.TunnelPort) bool {
388 for _, label := range port.Labels {
389 if strings.EqualFold(label, InternalPortLabel) {
390 return true
391 }
392 }
393
394 return false
395}
396
397// convertIntToUint16 converts the given int to a uint16.
398func convertIntToUint16(port int) (uint16, error) {

Callers 2

ListPortsMethod · 0.92
TestIsInternalPortFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsInternalPortFunction · 0.68