This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master by this push:
new af398916b7 Use Go Pascal-case cardinality forms in Gremlin-Go
reference docs
af398916b7 is described below
commit af398916b7f6fbfeb51827ae206d96aaeb7dd43d
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri Sep 25 07:23:27 2026 +0000
Use Go Pascal-case cardinality forms in Gremlin-Go reference docs
The Gremlin-Go section of the variants reference described the
value-carrying
cardinality functions with the Java-style spellings list(), set(), and
single(). Gremlin-Go uses Pascal-case member names, consistent with the
step-naming rule stated earlier in the same section. Update the prose to
reference CardinalityValue.List(v), CardinalityValue.Set(v), and
CardinalityValue.Single(v), and add a short Go example so the forms are
copy-paste ready.
Assisted-by: Kiro:claude-opus-4.8
---
docs/src/reference/gremlin-variants.asciidoc | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/docs/src/reference/gremlin-variants.asciidoc
b/docs/src/reference/gremlin-variants.asciidoc
index 556bb17e69..f963336533 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -722,9 +722,17 @@ To make the code more readable and close to the Gremlin
query language), you can
var order = gremlingo.Order
----
-Finally, the enum construct for `Cardinality` cannot have functions attached
to it the way it can be done in Java,
-therefore cardinality functions that take a value like `list()`, `set()`, and
`single()` are referenced from a
-`CardinalityValue` class rather than `Cardinality` itself.
+Finally, the enum construct for `Cardinality` cannot have functions attached
to it the way it can be done in Java.
+Cardinality functions that take a value are therefore referenced from
`CardinalityValue` rather than from
+`Cardinality` itself, and they follow the same Pascal-case convention as the
step names described above:
+`CardinalityValue.List(v)`, `CardinalityValue.Set(v)`, and
`CardinalityValue.Single(v)`. Qualified with the
+package name, these forms are `gremlingo.CardinalityValue.List(v)` and its
`Set` and `Single` counterparts, and
+each is supplied as a property value:
+
+[source,go]
+----
+ g.V().Has("name", "foo").Property(map[interface{}]interface{}{"name":
gremlingo.CardinalityValue.Set("bar"), "age": 43})
+----
[[gremlin-go-limitations]]
=== Limitations