jennifer:Jennifer是Go的代码生成器 源码
珍妮佛 Jennifer是Go的代码生成器。 package main import ( "fmt" . "github.com/dave/jennifer/jen" ) func main () { f := NewFile ( "main" ) f . Func (). Id ( "main" ). Params (). Block ( Qual ( "fmt" , "Println" ). Call ( Lit ( "Hello, world" )), ) fmt . Printf ( "%#v" , f ) } 输出: package
文件列表
jennifer-master.zip
(预估有个35文件)
jennifer-master
.travis.yml
259B
jennifer.go
431B
LICENSE
1KB
gennames
hints.go
3KB
main.go
950B
README.md
2KB
README.md.tpl
13KB
.gitignore
304B
暂无评论