2021-07-25 15:10:34 +02:00
|
|
|
package cli
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
2021-08-05 19:58:15 +02:00
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
2021-07-25 15:10:34 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.PersistentFlags().StringP("output", "o", "", "Output format. Empty for human-readable, 'json' or 'json-line'")
|
|
|
|
}
|
|
|
|
|
|
|
|
var rootCmd = &cobra.Command{
|
|
|
|
Use: "headscale",
|
|
|
|
Short: "headscale - a Tailscale control server",
|
|
|
|
Long: `
|
|
|
|
headscale is an open source implementation of the Tailscale control server
|
|
|
|
|
2021-08-05 19:58:15 +02:00
|
|
|
https://github.com/juanfont/headscale`,
|
2021-07-25 15:10:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func Execute() {
|
|
|
|
if err := rootCmd.Execute(); err != nil {
|
|
|
|
fmt.Fprintln(os.Stderr, err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|