MCPcopy
hub / github.com/davyxu/tabtoy / V3Entry

Function V3Entry

entry_v3.go:106–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106func V3Entry() {
107 globals := model.NewGlobals()
108 globals.Version = build.Version
109 globals.ParaLoading = *paramPara
110 if *paramUseCache {
111 globals.CacheDir = *paramCacheDir
112 os.Mkdir(globals.CacheDir, 0666)
113 }
114 globals.IndexFile = *paramIndexFile
115 globals.PackageName = *paramPackageName
116 globals.CombineStructName = *paramCombineStructName
117 globals.GenBinary = *paramBinaryOut != "" || *paramBinaryDir != ""
118
119 idxloader := helper.NewFileLoader(true, globals.CacheDir)
120 globals.IndexGetter = idxloader
121
122 var err error
123 if *paramTagAction != "" {
124 globals.TagActions, err = model.ParseTagAction(*paramTagAction)
125 if err != nil {
126 goto Exit
127 }
128 }
129
130 err = compiler.Compile(globals)
131
132 if err != nil {
133 goto Exit
134 }
135
136 report.Log.Debugln("Generate files...")
137 err = GenFileByList(globals)
138 if err != nil {
139 goto Exit
140 }
141
142 return
143Exit:
144 report.Log.Errorln(err)
145 os.Exit(1)
146}

Callers 1

mainFunction · 0.85

Calls 5

NewGlobalsFunction · 0.92
NewFileLoaderFunction · 0.92
ParseTagActionFunction · 0.92
CompileFunction · 0.92
GenFileByListFunction · 0.85

Tested by

no test coverage detected