mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-24 18:51:18 -08:00
WIP snapshot
Next up: view support for maps, etc.
This commit is contained in:
1 parent
b14db5d943
commit
c7b7546587
15 files changed
+680
-60
No files matched your search
@@ -5,6 +5,8 @@
|
||||
// Package netmap contains the netmap.NetworkMap type.
|
||||
package netmap
|
||||
|
||||
//go:generate go run tailscale.com/cmd/viewer --type=NetworkMap --output=netmap_view.go
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
@@ -66,8 +68,8 @@ type NetworkMap struct {
|
||||
// MagicDNS isn't necessarily in use).
|
||||
//
|
||||
// It will neither start nor end with a period.
|
||||
func (nm *NetworkMap) MagicDNSSuffix() string {
|
||||
name := strings.Trim(nm.Name, ".")
|
||||
func (nm NetworkMapView) MagicDNSSuffix() string {
|
||||
name := strings.Trim(nm.Name(), ".")
|
||||
if i := strings.Index(name, "."); i != -1 {
|
||||
name = name[i+1:]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user