Logo
Explore Help
Register Sign In
zlei6/go-zero
1
0
Fork 0
You've already forked go-zero
mirror of https://github.com/zeromicro/go-zero.git synced 2026-05-13 18:00:00 +08:00
Code Issues Packages Projects Releases Wiki Activity
Files
85a815bea0bf7e97f9029813053659cbf70f57b2
go-zero/tools/goctl/templatex/head.go

12 lines
271 B
Go
Raw Normal View History

support api templates
2020-10-15 16:36:49 +08:00
package templatex
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
refine goctl rpc generator
2020-08-28 21:22:35 +08:00
var headTemplate = `// Code generated by goctl. DO NOT EDIT!
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
// Source: {{.source}}`
func GetHead(source string) string {
buffer, _ := With("head").Parse(headTemplate).Execute(map[string]interface{}{
"source": source,
})
return buffer.String()
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.5 Page: 325ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API