dev
This commit is contained in:
21
internal/codegen/file.go
Normal file
21
internal/codegen/file.go
Normal 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()
|
||||
}
|
||||
Reference in New Issue
Block a user