cmd/tailscale: use tailnet display name on cli (#17079)
Updates cli to use tailnet display name Updates tailscale/corp#32108 Signed-off-by: nikiUppal-TS <nikita@tailscale.com>
This commit is contained in:
@@ -5,6 +5,7 @@ package ipn
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"cmp"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
@@ -1001,6 +1002,13 @@ func (n NetworkProfile) RequiresBackfill() bool {
|
||||
return n == NetworkProfile{}
|
||||
}
|
||||
|
||||
// DisplayNameOrDefault will always return a non-empty string.
|
||||
// If there is a defined display name, it will return that.
|
||||
// If they did not it will default to their domain name.
|
||||
func (n NetworkProfile) DisplayNameOrDefault() string {
|
||||
return cmp.Or(n.DisplayName, n.DomainName)
|
||||
}
|
||||
|
||||
// LoginProfile represents a single login profile as managed
|
||||
// by the ProfileManager.
|
||||
type LoginProfile struct {
|
||||
|
||||
Reference in New Issue
Block a user