mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-10-28 10:51:44 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			646 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			646 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package cli
 | 
						|
 | 
						|
import (
 | 
						|
	"fmt"
 | 
						|
	"os"
 | 
						|
 | 
						|
	"github.com/spf13/cobra"
 | 
						|
)
 | 
						|
 | 
						|
func init() {
 | 
						|
	rootCmd.PersistentFlags().
 | 
						|
		StringP("output", "o", "", "Output format. Empty for human-readable, 'json', 'json-line' or 'yaml'")
 | 
						|
	rootCmd.PersistentFlags().
 | 
						|
		Bool("force", false, "Disable prompts and forces the execution")
 | 
						|
}
 | 
						|
 | 
						|
var rootCmd = &cobra.Command{
 | 
						|
	Use:   "headscale",
 | 
						|
	Short: "headscale - a Tailscale control server",
 | 
						|
	Long: `
 | 
						|
headscale is an open source implementation of the Tailscale control server
 | 
						|
 | 
						|
https://github.com/juanfont/headscale`,
 | 
						|
}
 | 
						|
 | 
						|
func Execute() {
 | 
						|
	if err := rootCmd.Execute(); err != nil {
 | 
						|
		fmt.Fprintln(os.Stderr, err)
 | 
						|
		os.Exit(1)
 | 
						|
	}
 | 
						|
}
 |