-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmain.go
More file actions
64 lines (55 loc) · 2.45 KB
/
main.go
File metadata and controls
64 lines (55 loc) · 2.45 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package main
import (
"github.com/Smartling/smartling-cli/cmd"
"github.com/Smartling/smartling-cli/cmd/docs"
"github.com/Smartling/smartling-cli/cmd/files"
deletecmd "github.com/Smartling/smartling-cli/cmd/files/delete"
importcmd "github.com/Smartling/smartling-cli/cmd/files/import"
"github.com/Smartling/smartling-cli/cmd/files/list"
"github.com/Smartling/smartling-cli/cmd/files/pull"
"github.com/Smartling/smartling-cli/cmd/files/push"
"github.com/Smartling/smartling-cli/cmd/files/rename"
"github.com/Smartling/smartling-cli/cmd/files/status"
initialize "github.com/Smartling/smartling-cli/cmd/init"
"github.com/Smartling/smartling-cli/cmd/mt"
"github.com/Smartling/smartling-cli/cmd/mt/detect"
"github.com/Smartling/smartling-cli/cmd/mt/translate"
"github.com/Smartling/smartling-cli/cmd/projects"
"github.com/Smartling/smartling-cli/cmd/projects/info"
listprojects "github.com/Smartling/smartling-cli/cmd/projects/list"
"github.com/Smartling/smartling-cli/cmd/projects/locales"
output "github.com/Smartling/smartling-cli/output/mt"
)
func main() {
cmd.ConfigureLogger()
rootCmd := cmd.NewRootCmd()
docsCmd := docs.NewDocsCmd()
rootCmd.AddCommand(docsCmd)
initSrvInitializer := initialize.NewSrvInitializer()
initCmd := initialize.NewInitCmd(initSrvInitializer)
rootCmd.AddCommand(initCmd)
filesCmd := files.NewFilesCmd()
rootCmd.AddCommand(filesCmd)
filesSrvInitializer := files.NewSrvInitializer()
filesCmd.AddCommand(deletecmd.NewDeleteCmd(filesSrvInitializer))
filesCmd.AddCommand(importcmd.NewImportCmd(filesSrvInitializer))
filesCmd.AddCommand(list.NewListCmd(filesSrvInitializer))
filesCmd.AddCommand(pull.NewPullCmd(filesSrvInitializer))
filesCmd.AddCommand(push.NewPushCmd(filesSrvInitializer))
filesCmd.AddCommand(rename.NewRenameCmd(filesSrvInitializer))
filesCmd.AddCommand(status.NewStatusCmd(filesSrvInitializer))
projectsCmd := projects.NewProjectsCmd()
rootCmd.AddCommand(projectsCmd)
projectsSrvInitializer := projects.NewSrvInitializer()
projectsCmd.AddCommand(listprojects.NewListCmd(projectsSrvInitializer))
projectsCmd.AddCommand(info.NewInfoCmd(projectsSrvInitializer))
projectsCmd.AddCommand(locales.NewLocalesCmd(projectsSrvInitializer))
mtCmd := mt.NewMTCmd()
rootCmd.AddCommand(mtCmd)
mtInitializer := mt.NewSrvInitializer()
mtCmd.AddCommand(detect.NewDetectCmd(mtInitializer))
mtCmd.AddCommand(translate.NewTranslateCmd(mtInitializer))
if err := rootCmd.Execute(); err != nil {
output.RenderAndExitIfErr(err)
}
}