mirror of
https://github.com/tailscale/tailscale.git
synced 2026-04-05 07:03:43 -04:00
To reduce size, combine tailscaled and tailscale into a single binary which will figure out what it should do based on argv[0]. Signed-off-by: Denton Gentry <dgentry@tailscale.com>
17 lines
237 B
Go
17 lines
237 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func main() {
|
|
if strings.HasSuffix(os.Args[0], "tailscaled") {
|
|
tailscaled_main()
|
|
} else if strings.HasSuffix(os.Args[0], "tailscale") {
|
|
tailscale_main()
|
|
} else {
|
|
panic(os.Args[0])
|
|
}
|
|
}
|