MCPcopy Create free account
hub / github.com/pires/go-proxyproto / IsLocal

Method IsLocal

version_cmd.go:24–26  ·  view source on GitHub ↗

IsLocal returns true if the command in v2 is LOCAL or the transport in v1 is UNKNOWN, i.e. when no address information is expected, false otherwise.

()

Source from the content-addressed store, hash-verified

22// IsLocal returns true if the command in v2 is LOCAL or the transport in v1 is UNKNOWN,
23// i.e. when no address information is expected, false otherwise.
24func (pvc ProtocolVersionAndCommand) IsLocal() bool {
25 return LOCAL == pvc
26}
27
28// IsProxy returns true if the command in v2 is PROXY or the transport in v1 is not UNKNOWN,
29// i.e. when valid local/remote address and port information is expected, false otherwise.

Callers 6

IsUnspecMethod · 0.95
toByteMethod · 0.95
LocalAddrMethod · 0.80
RemoteAddrMethod · 0.80
TestLocalFunction · 0.80
TestProxyFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestLocalFunction · 0.64
TestProxyFunction · 0.64