Compare commits

...

2 Commits

Author SHA1 Message Date
Chris Palmer
3a89671c05 cli: print large ints as strings
JS/JSON integers are 64-bit floats, so only 53 bits of int are really available.
Print large ints as strings so that they don't get truncated or otherwise
mangled.

Fixes #7576

Signed-off-by: Chris Palmer <cpalmer@tailscale.com>
2023-07-28 13:57:13 -07:00
Chris Palmer
879c8bd9e2 cmd/tailscale/cli: make update visible in list
This also makes "HIDDEN: " work (requires the custom UsageFunc).

Updates #6995

Signed-off-by: Chris Palmer <cpalmer@tailscale.com>
2023-07-28 13:31:52 -07:00
2 changed files with 2 additions and 3 deletions

View File

@@ -130,6 +130,7 @@ change in the future.
netlockCmd,
licensesCmd,
exitNodeCmd,
updateCmd,
},
FlagSet: rootfs,
Exec: func(context.Context, []string) error { return flag.ErrHelp },
@@ -145,8 +146,6 @@ change in the future.
switch {
case slices.Contains(args, "debug"):
rootCmd.Subcommands = append(rootCmd.Subcommands, debugCmd)
case slices.Contains(args, "update"):
rootCmd.Subcommands = append(rootCmd.Subcommands, updateCmd)
}
if runtime.GOOS == "linux" && distro.Get() == distro.Synology {
rootCmd.Subcommands = append(rootCmd.Subcommands, configureHostCmd)

View File

@@ -197,7 +197,7 @@ type PeerStatus struct {
// It has the form "host.<MagicDNSSuffix>."
DNSName string
OS string // HostInfo.OS
UserID tailcfg.UserID
UserID tailcfg.UserID `json:",string"`
// TailscaleIPs are the IP addresses assigned to the node.
TailscaleIPs []netip.Addr