-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmain.go
More file actions
126 lines (114 loc) · 5.82 KB
/
Copy pathmain.go
File metadata and controls
126 lines (114 loc) · 5.82 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package main
import (
"github.com/Smartling/smartling-cli/cmd"
"github.com/Smartling/smartling-cli/cmd/build"
"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"
"github.com/Smartling/smartling-cli/cmd/glossaries"
glcreate "github.com/Smartling/smartling-cli/cmd/glossaries/create"
glexport "github.com/Smartling/smartling-cli/cmd/glossaries/export"
glimport "github.com/Smartling/smartling-cli/cmd/glossaries/import"
gllist "github.com/Smartling/smartling-cli/cmd/glossaries/list"
initialize "github.com/Smartling/smartling-cli/cmd/init"
"github.com/Smartling/smartling-cli/cmd/jobs"
jobfiles "github.com/Smartling/smartling-cli/cmd/jobs/files"
jobfileadd "github.com/Smartling/smartling-cli/cmd/jobs/files/add"
jobfilelist "github.com/Smartling/smartling-cli/cmd/jobs/files/list"
jobfileremove "github.com/Smartling/smartling-cli/cmd/jobs/files/remove"
jobfindbystrings "github.com/Smartling/smartling-cli/cmd/jobs/find_by_strings"
joblist "github.com/Smartling/smartling-cli/cmd/jobs/list"
joblocales "github.com/Smartling/smartling-cli/cmd/jobs/locales"
joblocaleadd "github.com/Smartling/smartling-cli/cmd/jobs/locales/add"
joblocaleremove "github.com/Smartling/smartling-cli/cmd/jobs/locales/remove"
"github.com/Smartling/smartling-cli/cmd/jobs/progress"
jobstrings "github.com/Smartling/smartling-cli/cmd/jobs/strings"
jobstringadd "github.com/Smartling/smartling-cli/cmd/jobs/strings/add"
jobstringlist "github.com/Smartling/smartling-cli/cmd/jobs/strings/list"
jobstringremove "github.com/Smartling/smartling-cli/cmd/jobs/strings/remove"
jobview "github.com/Smartling/smartling-cli/cmd/jobs/view"
"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)
buildCmd := build.NewBuildCmd()
rootCmd.AddCommand(buildCmd)
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))
jobsCmd := jobs.NewJobsCmd()
rootCmd.AddCommand(jobsCmd)
jobInitializer := jobs.NewSrvInitializer()
jobsCmd.AddCommand(progress.NewProgressCmd(jobInitializer))
jobsCmd.AddCommand(joblist.NewListCmd(jobInitializer))
jobsCmd.AddCommand(jobview.NewViewCmd(jobInitializer))
jobsCmd.AddCommand(jobfindbystrings.NewFindByStringsCmd(jobInitializer))
jobFiles := jobfiles.NewJobFilesCmd()
jobFilesInitializer := jobfiles.NewSrvInitializer()
jobFiles.AddCommand(jobfilelist.NewListCmd(jobFilesInitializer))
jobFiles.AddCommand(jobfileadd.NewJobFilesAddCmd(jobFilesInitializer))
jobFiles.AddCommand(jobfileremove.NewJobFilesRemoveCmd(jobFilesInitializer))
jobsCmd.AddCommand(jobFiles)
jobLocales := joblocales.NewJobLocalesCmd()
jobLocalesInitializer := joblocales.NewSrvInitializer()
jobLocales.AddCommand(joblocaleadd.NewJobLocalesAddCmd(jobLocalesInitializer))
jobLocales.AddCommand(joblocaleremove.NewJobLocalesRemoveCmd(jobLocalesInitializer))
jobsCmd.AddCommand(jobLocales)
jobStrings := jobstrings.NewJobStringsCmd()
jobStringsInitializer := jobstrings.NewSrvInitializer()
jobStrings.AddCommand(jobstringadd.NewJobStringsAddCmd(jobStringsInitializer))
jobStrings.AddCommand(jobstringremove.NewJobStringsRemoveCmd(jobStringsInitializer))
jobStrings.AddCommand(jobstringlist.NewJobStringsListCmd(jobStringsInitializer))
jobsCmd.AddCommand(jobStrings)
glossariesCmd := glossaries.NewGlossariesCmd()
rootCmd.AddCommand(glossariesCmd)
glossarySrvInitializer := glossaries.NewSrvInitializer()
glossaryImport := glimport.NewImportCmd(glossarySrvInitializer)
glossaryExport := glexport.NewExportCmd(glossarySrvInitializer)
glossaryCreate := glcreate.NewCreateCmd(glossarySrvInitializer)
glossaryList := gllist.NewListCmd(glossarySrvInitializer)
glossariesCmd.AddCommand(glossaryImport)
glossariesCmd.AddCommand(glossaryExport)
glossariesCmd.AddCommand(glossaryCreate)
glossariesCmd.AddCommand(glossaryList)
if err := rootCmd.Execute(); err != nil {
output.RenderAndExitIfErr(err)
}
}