-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
47 lines (42 loc) · 832 Bytes
/
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
46
47
/*
* Copyright 2015 Ming-der Wang <[email protected]> All rights reserved.
* Licensed under MIT License.
*/
package main
import (
// "fmt"
"github.com/mingderwang/ginger/gen"
"github.com/mingderwang/ginger/parse"
"os"
)
// don't print
type Person2 struct {
FirstName string
LastName string
HairColor string
}
// @ginger test
type Person struct {
FirstName string
LastName string
HairColor string
}
func main() {
if len(os.Args) > 1 {
var types []string
fileName := os.Args[1]
if fileName == "" {
return
}
types = parse.Scan("", fileName)
for _, typeName := range types {
gen.GenWebService(typeName)
gen.GenResourceFile(typeName)
gen.GenMain(typeName)
// gen.GenConfig(typeName)
gen.GenMakefile(typeName)
gen.GenDockerfile(typeName)
gen.GenShellCode(typeName)
}
}
}