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-10 08:29:58 +08:00
Code Issues Packages Projects Releases Wiki Activity
Files
cf3a1020b0a1eca6d3b2fc059d08dfd5797d020f
go-zero/tools/goctl/util/head.go

12 lines
266 B
Go
Raw Normal View History

use goctl template to generate all kinds of templates
2020-10-19 23:13:18 +08:00
package util
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: 26ms Template: 1ms
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