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

..03-May-2022-

args/H28-Jan-2019-

boilerplate/H03-May-2022-

examples/H28-Jan-2019-

generator/H28-Jan-2019-

namer/H28-Jan-2019-

parser/H28-Jan-2019-

testdata/a/H28-Jan-2019-

types/H28-Jan-2019-

vendor/fake/dep/H28-Jan-2019-

.import-restrictionsH A D28-Jan-2019150

.travis.ymlH A D28-Jan-2019350

CONTRIBUTING.mdH A D28-Jan-2019496

LICENSEH A D28-Jan-201911.1 KiB

OWNERSH A D28-Jan-201947

README.mdH A D28-Jan-20191.9 KiB

SECURITY_CONTACTSH A D28-Jan-2019601

code-of-conduct.mdH A D28-Jan-2019148

README.md

1# gengo
2
3[![Travis Widget]][Travis] [![GoDoc Widget]][GoDoc]  [![GoReport]][GoReportStatus]
4
5[Travis]: https://travis-ci.org/kubernetes/gengo
6[Travis Widget]: https://travis-ci.org/kubernetes/gengo.svg?branch=master
7[GoDoc]: https://godoc.org/k8s.io/gengo
8[GoDoc Widget]: https://godoc.org/k8s.io/gengo?status.svg
9[GoReport]: https://goreportcard.com/badge/github.com/kubernetes/gengo
10[GoReportStatus]: https://goreportcard.com/report/github.com/kubernetes/gengo
11
12A package for generating things based on go files. This mechanism was first used
13in Kubernetes and is split out here for ease of reuse and maintainability.
14
15`go get k8s.io/gengo`
16
17## Examples
18
19A set generator, deep-copy generator, defaulter generator and go-to-protobuf
20generator are included here. Also, import-boss will enforce arbitrary rules about
21import trees.
22
23## args/
24
25Package args defines common arguments for a generator binary.
26
27## generator/
28
29Package generator defines interfaces for code generators to implement, and
30machinery that will execute those code generators.
31
32## types/
33
34Package types contains the type system definition. It is modeled after Go's type
35system, but it's intended that you could produce these types by parsing
36something else, if you want to write the parser/converter.
37
38We don't directly use the go types in the go typecheck library because they are
39based on implementing differing interfaces. A struct-based format is more
40convenient input for template driven output.
41
42## parser/
43
44Package parser parses go source files.
45
46## namer/
47
48Package namer defines a naming system, for:
49* helping you reference go objects in a syntactically correct way
50* keeping track of what you reference, for importing the right packages
51* and defining parallel tracks of names, for making public interfaces and
52  private implementations.
53
54## Contributing
55
56Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute.
57