Add header comment to generated files
This commit is contained in:
parent
754cfa602c
commit
8e0208dec2
@ -19,6 +19,8 @@ func NewRoutes(w io.Writer, pkgName string) *RoutesGenerator {
|
||||
|
||||
func (r *RoutesGenerator) Generate(routes []parser.Route, impls map[string]string) error {
|
||||
f := jen.NewFile(r.PkgName)
|
||||
f.HeaderComment("Code generated by go.arsenm.dev/go-lemmy/cmd/gen (routes generator). DO NOT EDIT.")
|
||||
|
||||
for _, r := range routes {
|
||||
resStruct := impls[r.Struct]
|
||||
|
||||
|
@ -19,6 +19,8 @@ func NewStruct(w io.Writer, pkgName string) *StructGenerator {
|
||||
|
||||
func (s *StructGenerator) Generate(items []parser.Item) error {
|
||||
f := jen.NewFile(s.PkgName)
|
||||
f.HeaderComment("Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.")
|
||||
|
||||
for _, item := range items {
|
||||
if item.Struct != nil {
|
||||
st := item.Struct
|
||||
|
Loading…
Reference in New Issue
Block a user