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)
| 253 | // |
| 254 | // It will neither start nor end with a period. |
| 255 | func 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). |
no outgoing calls
no test coverage detected
searching dependent graphs…