Documentation ¶
Index ¶
- func Repackage(inFile, outFile, pkg string)
- func WriteGo(w io.Writer, pkg, tags string, b []byte) (n int, err error)
- func WriteGoFile(filename, pkg string, b []byte) (n int)
- type Writer
- func (w *Writer) Write(p []byte) (n int, err error)
- func (w *Writer) WriteArray(x any)
- func (w *Writer) WriteComment(comment string, args ...any)
- func (w *Writer) WriteConst(name string, x any)
- func (w *Writer) WriteGo(out io.Writer, pkg, tags string) (n int, err error)
- func (w *Writer) WriteGoFile(filename, pkg string) (n int)
- func (w *Writer) WriteSlice(x any)
- func (w *Writer) WriteString(s string)
- func (w *Writer) WriteType(x any) string
- func (w *Writer) WriteVar(name string, x any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Repackage ¶
func Repackage(inFile, outFile, pkg string)
Repackage copies the given inFile to outFile adjusting the to the given package name. It assumes that the given inFile is in package main, panics otherwise.
func WriteGoFile ¶
WriteGoFile writes the go file with the given filename and pkg, and returns the size of the bytes written
Types ¶
type Writer ¶
type Writer struct { Size int Hash hash.Hash32 // content hash // contains filtered or unexported fields }
func (*Writer) WriteArray ¶
func (*Writer) WriteComment ¶
func (*Writer) WriteConst ¶
func (*Writer) WriteGoFile ¶
WriteGoFile writes the go file with the given filename and pkg, and returns the size of the bytes written
func (*Writer) WriteSlice ¶
func (*Writer) WriteString ¶
Click to show internal directories.
Click to hide internal directories.