forked from labulakalia/crocodile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
45 lines (38 loc) · 1.02 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package main
import (
"fmt"
"github.com/labulaka521/crocodile/core/cmd"
"github.com/labulaka521/crocodile/core/version"
"github.com/spf13/cobra"
)
var (
v string
c string
d string
)
// @title Crocidle API
// @version 1.0
// @description Crocodile Swaager JSON API
// @termsOfService https://github.com/labulaka521/crocodile
// @contact.name labulaka521
// @contact.url http://www.swagger.io/support
// @contact.email labulakalia@gmail.com
// @license.name MIT 2.0
// @license.url https://github.com/labulaka521/crocodile/blob/master/LICENSE
// @securityDefinitions.basic BasicAuth
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
func main() {
version.Commit = c
version.Version = v
version.BuildDate = d
rootCmd := &cobra.Command{Use: "crocodile"}
rootCmd.AddCommand(cmd.Client())
rootCmd.AddCommand(cmd.Server())
rootCmd.AddCommand(cmd.Version())
rootCmd.AddCommand(cmd.GeneratePemKey())
if err := rootCmd.Execute(); err != nil {
fmt.Println("rootCmd.Execute failed", err.Error())
}
}