Files
go-zero/tools/goctl/util/head.go
Keson db16115037 rpc service generation (#26)
* add execute files

* add protoc-osx

* add rpc generation

* add rpc generation

* add: rpc template generation

* update usage

* fixed env prepare for project in go path

* optimize gomod cache

* add README.md

* format error

* reactor templatex.go

* remove waste code
2020-08-28 19:24:58 +08:00

12 lines
266 B
Go

package util
var headTemplate = `// Code generated by goctl. DO NOT EDIT.
// Source: {{.source}}`
func GetHead(source string) string {
buffer, _ := With("head").Parse(headTemplate).Execute(map[string]interface{}{
"source": source,
})
return buffer.String()
}