cmd/tailscaled: split package main into main shim + package

So we can empty import the guts of cmd/tailscaled from another
module for go mod tidy reasons.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-03-24 21:08:17 -07:00
committed by Brad Fitzpatrick
parent 28af46fb3b
commit 82c4cb765c
8 changed files with 47 additions and 30 deletions
+19
View File
@@ -0,0 +1,19 @@
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The tailscaled program is the Tailscale daemon. It's configured
// and controlled via either the tailscale CLI program or GUIs.
package main // import "tailscale.com/cmd/tailscaled"
import "tailscale.com/cmd/tailscaled/tailscaled"
// Don't add any new imports or code to this file. The real
// code is in tailscale.com/cmd/tailscale/tailscaled as a package
// so things can depend on it for dependency reasons.
// (Go programs can't import package main so we split the real code
// off where we could have a dummy package empty import it)
func main() {
tailscaled.Main()
}