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
836229a0
Commit
836229a0
authored
Oct 24, 2019
by
Eric Myhre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup a few comments
parent
a8812608
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
schema/gen/go/genCommon.go
schema/gen/go/genCommon.go
+3
-1
schema/gen/go/genKindList.go
schema/gen/go/genKindList.go
+2
-3
No files found.
schema/gen/go/genCommon.go
View file @
836229a0
...
...
@@ -376,7 +376,9 @@ func (gk generateKindedRejections_Link) EmitNodeMethodAsString(w io.Writer) {
// Embeddable to do all the "nope" methods at once.
//
// Used for anything that "acts like" map (so, also struct).
// Used for anything that "acts like" list (mostly this is just lists,
// but even e.g. structs-with-a-tuple-representation can end up using this
// as part of emitting their representation nodes).
type
generateKindedRejections_List
struct
{
TypeIdent
string
// see doc in generateKindedRejections
TypeProse
string
// see doc in generateKindedRejections
...
...
schema/gen/go/genKindList.go
View file @
836229a0
...
...
@@ -24,8 +24,7 @@ type generateKindList struct {
}
func
(
gk
generateKindList
)
EmitNodeType
(
w
io
.
Writer
)
{
// Observe that we get a '*' if a field is *either* nullable *or* optional;
// and we get an extra bool for the second cardinality +1'er if both are true.
// Observe that we get a '*' if the values are nullable.
doTemplate
(
`
var _ ipld.Node = {{ .Type | mungeTypeNodeIdent }}{}
var _ typed.Node = {{ .Type | mungeTypeNodeIdent }}{}
...
...
@@ -66,7 +65,7 @@ func (gk generateKindList) EmitNodeMethodLookupIndex(w io.Writer) {
{{- else }}
return x.x[index], nil
{{- end }}
}
}
`
,
w
,
gk
)
}
...
...
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