• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..20-Nov-2015-

README.mdH A D20-Nov-2015966 3725

gen.goH A D20-Nov-20157.8 KiB274213

z.goH A D20-Nov-201564 42

README.md

1# codecgen tool
2
3Generate is given a list of *.go files to parse, and an output file (fout),
4codecgen will create an output file __file.go__ which
5contains `codec.Selfer` implementations for the named types found
6in the files parsed.
7
8Using codecgen is very straightforward.
9
10**Download and install the tool**
11
12`go get -u github.com/ugorji/go/codec/codecgen`
13
14**Run the tool on your files**
15
16The command line format is:
17
18`codecgen [options] (-o outfile) (infile ...)`
19
20```sh
21% codecgen -?
22Usage of codecgen:
23  -c="github.com/ugorji/go/codec": codec path
24  -o="": out file
25  -r=".*": regex for type name to match
26  -rt="": tags for go run
27  -t="": build tag to put in file
28  -u=false: Use unsafe, e.g. to avoid unnecessary allocation on []byte->string
29  -x=false: keep temp file
30
31% codecgen -o values_codecgen.go values.go values2.go moretypedefs.go
32```
33
34Please see the [blog article](http://ugorji.net/blog/go-codecgen)
35for more information on how to use the tool.
36
37