MCPcopy Index your code
hub / github.com/tailscale/tailscale / MagicDNSSuffixOfNodeName

Function MagicDNSSuffixOfNodeName

types/netmap/netmap.go:255–261  ·  view source on GitHub ↗

MagicDNSSuffix returns the domain's MagicDNS suffix (even if MagicDNS isn't necessarily in use) of the provided Node.Name value. It will neither start nor end with a period.

(nodeName string)

Source from the content-addressed store, hash-verified

253//
254// It will neither start nor end with a period.
255func MagicDNSSuffixOfNodeName(nodeName string) string {
256 name := strings.Trim(nodeName, ".")
257 if _, rest, ok := strings.Cut(name, "."); ok {
258 return rest
259 }
260 return name
261}
262
263// MagicDNSSuffix returns the domain's MagicDNS suffix (even if
264// MagicDNS isn't necessarily in use).

Callers 2

initDisplayNamesFunction · 0.92
MagicDNSSuffixMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…