worryg0d commented on code in PR #1838:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1838#discussion_r1824060071


##########
marshal.go:
##########
@@ -333,7 +333,7 @@ func marshalVarchar(info TypeInfo, value interface{}) 
([]byte, error) {
        case k == reflect.Slice && t.Elem().Kind() == reflect.Uint8:
                return rv.Bytes(), nil
        }
-       return nil, marshalErrorf("can not marshal %T into %s", value, info)
+       return nil, marshalErrorf("can not marshal %T into %s. Accepted types: 
Marshaler, string, []byte, unsetColumn.", value, info)

Review Comment:
   `unsetColumn` is not an exported type, so the driver doesn't have to expose 
it to the user. There is a `UnsetValue` global var of type `unsetColumn` which 
is meant to be used to ignore writing. You can find it 
[here](https://github.com/apache/cassandra-gocql-driver/blob/2a5056d6b1d1d479ca5ee97ddd1d95a9d8e8c4e2/frame.go#L50).



##########
marshal.go:
##########
@@ -2280,7 +2280,7 @@ func marshalUDT(info TypeInfo, value interface{}) 
([]byte, error) {
        }
 
        if k.Kind() != reflect.Struct || !k.IsValid() {
-               return nil, marshalErrorf("cannot marshal %T into %s", value, 
info)
+               return nil, marshalErrorf("cannot marshal %T into %s. Accepted 
types: Marshaler, unsetColumn, UDTMarshaler, UDTMarshaler, 
map[string]interface{}, struct.", value, info)

Review Comment:
   Here **UDTMarshaler** is duplicated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to