[ 
https://issues.apache.org/jira/browse/TINKERPOP-3305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18146949#comment-18146949
 ] 

ASF GitHub Bot commented on TINKERPOP-3305:
-------------------------------------------

kenhuuu commented on code in PR #3816:
URL: https://github.com/apache/tinkerpop/pull/3816#discussion_r4620984208


##########
gremlin-go/driver/customTypeWriter_example_test.go:
##########
@@ -0,0 +1,49 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// An external test package, so the example compiles only against the exported 
API.
+package gremlingo_test
+
+import (
+       "bytes"
+       "reflect"
+
+       gremlingo "github.com/apache/tinkerpop/gremlin-go/v3/driver"
+)
+
+// Point is an example provider-specific type.
+type Point struct {
+       Name string
+       X, Y int32
+}
+
+func ExampleRegisterCustomTypeWriter() {

Review Comment:
   I would keep it. From what I've read, this is pretty idiomatic for Go.





> CustomTypeWriter API references unexported type
> -----------------------------------------------
>
>                 Key: TINKERPOP-3305
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3305
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: go
>    Affects Versions: 3.8.2
>            Reporter: Ken Hu
>            Priority: Blocker
>
> The {{CustomTypeWriter}} in gremlin-go 
> https://github.com/apache/tinkerpop/blob/b82624473beaa0c36b1b0e38e77f18b300b3422e/gremlin-go/driver/serializer.go#L50
>  uses *graphBinaryTypeSerializer which isn't exported.
> Also noticed this isn't in {{master}} branch so confirm if that is correct 
> when merging up from {{3.8-dev}}.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to