-
Notifications
You must be signed in to change notification settings - Fork 0
fizz-is-fish/code-generator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
References from https://github.com/phcollignon/Go-Template v2.0 1. Edit main.go 2. Edit tpl 3. Run Have fun! v1.0 1. Download zip archive from github or clone this repository git clone https://github.com/phcollignon/Go-Template 2. Build the binary cd Go-Template/src && go build 3. Add Go-Template to your binaries or to your PATH sudo mv Go-Template /usr/local/bin or ln -s /Users/xxx/go/src/Go-Template/src/Go-Template /usr/local/bin/Go-Template 4. Modify the suffix of the output file .generated.txt -> .go 5. Rebuild example: func genController() { ctl := fmt.Sprintf("Go-Template -d controller.json -t controller.tpl -o %s", controllerPath) c := cmd.NewCommand(ctl) err := c.Execute() if err != nil { panic(err.Error()) } fmt.Println(c.Stdout()) fmt.Println(c.Stderr()) }
About
go code generator
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published