This commit is contained in:
2025-04-12 12:38:00 +08:00
parent 5341dfcd1a
commit 52bfd05b80
47 changed files with 4730 additions and 2 deletions

21
internal/codegen/file.go Normal file
View File

@@ -0,0 +1,21 @@
package codegen
import (
"bytes"
"fmt"
)
type File struct {
buf bytes.Buffer
}
func (f *File) P(v ...interface{}) {
for _, x := range v {
fmt.Fprint(&f.buf, x)
}
fmt.Fprintln(&f.buf)
}
func (f *File) Content() []byte {
return f.buf.Bytes()
}