cmd/tailscaled: eliminate unnecessary use of an init() function.

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
Avery Pennarun 2020-05-20 10:42:57 -04:00
parent c5fcc38bf1
commit d074ec6571
1 changed files with 2 additions and 5 deletions

View File

@ -36,15 +36,12 @@ import (
// later, the global state key doesn't look like a username.
const globalStateKey = "_daemon"
var defaultTunName = "tailscale0"
func init() {
func main() {
defaultTunName := "tailscale0"
if runtime.GOOS == "openbsd" {
defaultTunName = "tun"
}
}
func main() {
fake := getopt.BoolLong("fake", 0, "fake tunnel+routing instead of tuntap")
debug := getopt.StringLong("debug", 0, "", "Address of debug server")
tunname := getopt.StringLong("tun", 0, defaultTunName, "tunnel interface name")