Documentation ¶
Overview ¶
codecgen generates codec.Selfer implementations for a set of types.
Index ¶
Constants ¶
View Source
const GenCodecPath = "github.com/ugorji/go/codec"
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(outfile, buildTag, codecPkgPath string, useUnsafe bool, goRunTag string, regexName *regexp.Regexp, deleteTempFile bool, infiles ...string) (err error)
Generate is given a list of *.go files to parse, and an output file (fout).
It finds all types T in the files, and it creates 2 tmp files (frun).
- main package file passed to 'go run'
- package level file which calls *genRunner.Selfer to write Selfer impls for each T.
We use a package level file so that it can reference unexported types in the package being worked on. Tool then executes: "go run __frun__" which creates fout. fout contains Codec(En|De)codeSelf implementations for every type T.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.