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

Function IsInternalPort

internal/codespaces/portforwarder/port_forwarder.go:409–417  ·  view source on GitHub ↗

IsInternalPort returns true if the port is internal.

(port *tunnels.TunnelPort)

Source from the content-addressed store, hash-verified

407
408// IsInternalPort returns true if the port is internal.
409func IsInternalPort(port *tunnels.TunnelPort) bool {
410 for _, label := range port.Labels {
411 if strings.EqualFold(label, InternalPortLabel) {
412 return true
413 }
414 }
415
416 return false
417}
418
419// convertIntToUint16 converts the given int to a uint16.
420func convertIntToUint16(port int) (uint16, error) {

Callers 2

ListPortsMethod · 0.92
TestIsInternalPortFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsInternalPortFunction · 0.68