Mash up some code from ffcli and std's flag package to make a default
usage func that's super explicit for those not familiar with the Go
style flags. Only show double hyphens in usage text (but still accept both),
and show default values, and only show the proper usage of boolean flags.
Fixes#1353Fixes#1529
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
upf.StringVar(&upArgs.hostname,"hostname","","hostname to use instead of the one provided by the OS")
ifruntime.GOOS=="linux"||isBSD(runtime.GOOS){
upf.StringVar(&upArgs.advertiseRoutes,"advertise-routes","","routes to advertise to other nodes (comma-separated, e.g. 10.0.0.0/8,192.168.0.0/24)")
upf.StringVar(&upArgs.advertiseRoutes,"advertise-routes","","routes to advertise to other nodes (comma-separated, e.g. \"10.0.0.0/8,192.168.0.0/24\")")
upf.BoolVar(&upArgs.advertiseDefaultRoute,"advertise-exit-node",false,"offer to be an exit node for internet traffic for the tailnet")