Skip to content

Commit

Permalink
capnpc-go: use new generated code convention
Browse files Browse the repository at this point in the history
Exact format documented in https://golang.org/s/generatedcode

Fixes #78
  • Loading branch information
zombiezen committed May 16, 2017
1 parent 917bd4b commit dea4d92
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 35 deletions.
3 changes: 1 addition & 2 deletions capnpc-go/capnpc-go.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ func (g *generator) Capnp() string {
// generate produces unformatted Go source code from the nodes defined in it.
func (g *generator) generate() []byte {
var out bytes.Buffer
out.WriteString("// Code generated by capnpc-go.\n\n")
out.WriteString("// Code generated by capnpc-go. DO NOT EDIT.\n\n")
fmt.Fprintf(&out, "package %s\n\n", g.nodes[g.fileID].pkg)
out.WriteString("// AUTO GENERATED - DO NOT EDIT\n\n")
out.WriteString("import (\n")
for _, imp := range g.imports.usedImports() {
fmt.Fprintf(&out, "%v\n", imp)
Expand Down
4 changes: 1 addition & 3 deletions go.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions internal/aircraftlib/aircraft.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions internal/demo/books/books.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions internal/demo/hashes/hash.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions rpc/internal/testcapnp/test.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions std/capnp/cxx/c++.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions std/capnp/json/json.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions std/capnp/persistent/persistent.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions std/capnp/rpc/rpc.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions std/capnp/rpctwoparty/rpc-twoparty.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions std/capnp/schema/schema.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dea4d92

Please sign in to comment.