This patch contains the following cleanups:
1. Simplify `ffcli.Command` definitions;
2. Word-wrap help text, consistent with other commands;
3. `tailscale dns --help` usage makes subcommand usage more obvious;
4. `tailscale dns query --help` describes DNS record types.
Updates #cleanup
Signed-off-by: Simon Law <sfllaw@tailscale.com>
ShortHelp:"Print the current DNS status and configuration",
LongHelp:dnsStatusLongHelp(),
FlagSet:(func()*flag.FlagSet{
fs:=newFlagSet("status")
fs.BoolVar(&dnsStatusArgs.all,"all",false,"outputs advanced debugging information (fallback resolvers, nameservers, cert domains, extra records, and exit node filtered set)")
returnfs
})(),
},
{
Name:"query",
ShortUsage:"tailscale dns query <name> [a|aaaa|cname|mx|ns|opt|ptr|srv|txt]",
Exec:runDNSQuery,
ShortHelp:"Perform a DNS query",
LongHelp:"The 'tailscale dns query' subcommand performs a DNS query for the specified name using the internal DNS forwarder (100.100.100.100).\n\nIt also provides information about the resolver(s) used to resolve the query.",
},
dnsStatusCmd,
dnsQueryCmd,
// TODO: implement `tailscale log` here
// The above work is tracked in https://github.com/tailscale/tailscale/issues/13326