feat: add gen enum command
This commit is contained in:
16
pkg/utils/generator/embedded_1.16.go
Normal file
16
pkg/utils/generator/embedded_1.16.go
Normal file
@@ -0,0 +1,16 @@
|
||||
//go:build go1.16
|
||||
// +build go1.16
|
||||
|
||||
package generator
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"text/template"
|
||||
)
|
||||
|
||||
//go:embed enum.tmpl enum_string.tmpl
|
||||
var content embed.FS
|
||||
|
||||
func (g *Generator) addEmbeddedTemplates() {
|
||||
g.t = template.Must(g.t.ParseFS(content, "*.tmpl"))
|
||||
}
|
||||
Reference in New Issue
Block a user