-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ohdearaugustin
committed
Jul 25, 2021
1 parent
b97d6f7
commit 3a07360
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
"github.com/spf13/cobra" | ||
"os" | ||
) | ||
|
||
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 | ||
Juan Font Alonso <juanfontalonso@gmail.com> - 2021 | ||
https://gitlab.com/juanfont/headscale`, | ||
} | ||
|
||
func Execute() { | ||
if err := rootCmd.Execute(); err != nil { | ||
fmt.Fprintln(os.Stderr, err) | ||
os.Exit(1) | ||
} | ||
} |