Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ld
go-ld-prime
Commits
32e66f20
Commit
32e66f20
authored
Nov 17, 2020
by
Eric Myhre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codegen: rename files.
An underscore; and less "gen", because reviewers indicated it felt redundant.
parent
4f333954
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
schema/gen/go/generate.go
schema/gen/go/generate.go
+3
-3
No files found.
schema/gen/go/generate.go
View file @
32e66f20
...
...
@@ -16,7 +16,7 @@ import (
// All of the files produced will match the pattern "ipldsch.*.gen.go".
func
Generate
(
pth
string
,
pkgName
string
,
ts
schema
.
TypeSystem
,
adjCfg
*
AdjunctCfg
)
{
// Emit fixed bits.
withFile
(
filepath
.
Join
(
pth
,
"ipldsch
.
minima.
gen.
go"
),
func
(
f
io
.
Writer
)
{
withFile
(
filepath
.
Join
(
pth
,
"ipldsch
_
minima.go"
),
func
(
f
io
.
Writer
)
{
EmitInternalEnums
(
pkgName
,
f
)
})
...
...
@@ -76,7 +76,7 @@ func Generate(pth string, pkgName string, ts schema.TypeSystem, adjCfg *AdjunctC
}
// Emit a file with the type table, and the golang type defns for each type.
withFile
(
filepath
.
Join
(
pth
,
"ipldsch
.
types.
gen.
go"
),
func
(
f
io
.
Writer
)
{
withFile
(
filepath
.
Join
(
pth
,
"ipldsch
_
types.go"
),
func
(
f
io
.
Writer
)
{
// Emit headers, import statements, etc.
fmt
.
Fprintf
(
f
,
"package %s
\n\n
"
,
pkgName
)
fmt
.
Fprintf
(
f
,
doNotEditComment
+
"
\n\n
"
)
...
...
@@ -96,7 +96,7 @@ func Generate(pth string, pkgName string, ts schema.TypeSystem, adjCfg *AdjunctC
// Emit a file with all the Node/NodeBuilder/NodeAssembler boilerplate.
// Also includes typedefs for representation-level data.
// Also includes the MaybeT boilerplate.
withFile
(
filepath
.
Join
(
pth
,
"ipldsch
.
satisfaction.
gen.
go"
),
func
(
f
io
.
Writer
)
{
withFile
(
filepath
.
Join
(
pth
,
"ipldsch
_
satisfaction.go"
),
func
(
f
io
.
Writer
)
{
// Emit headers, import statements, etc.
fmt
.
Fprintf
(
f
,
"package %s
\n\n
"
,
pkgName
)
fmt
.
Fprintf
(
f
,
doNotEditComment
+
"
\n\n
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment