-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
33 lines (28 loc) · 776 Bytes
/
main.go
File metadata and controls
33 lines (28 loc) · 776 Bytes
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
package main
import (
"fmt"
"os"
"github.com/javaboy-github/only-programer-sns-client/global"
"github.com/javaboy-github/only-programer-sns-client/msg"
"github.com/javaboy-github/only-programer-sns-client/user"
"github.com/spf13/cobra"
)
var RootCmd = &cobra.Command{
Use: global.AppName,
Short: global.AppName + ": Programer only SNS のクライアント。",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("使い方が間違ってます。--helpを見てください。")
},
Version: global.Version,
}
func main() {
if err := RootCmd.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "%s: %v\n", os.Args[0], err)
os.Exit(-1)
}
}
func init() {
cobra.OnInitialize()
RootCmd.AddCommand(msg.MsgCmd())
RootCmd.AddCommand(user.UserCmd())
}