Skip to content

Commit

Permalink
correctly allow Marshaler for UDT
Browse files Browse the repository at this point in the history
  • Loading branch information
Zariel committed Apr 17, 2015
1 parent c3ed1a1 commit e67c0fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,8 @@ func marshalUDT(info TypeInfo, value interface{}) ([]byte, error) {
udt := info.(UDTTypeInfo)

switch v := value.(type) {
case Marshaler:
return v.MarshalCQL(info)
case UDTMarshaler:
var buf []byte
for _, e := range udt.Elements {
Expand Down

0 comments on commit e67c0fe

Please sign in to comment.