Skip to content

Commit

Permalink
go/common/cbor: Re-export Marshaler and Unmarshaler interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
kostko committed Jan 13, 2021
1 parent 329f51a commit 1d88833
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/3630.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go/common/cbor: Re-export Marshaler and Unmarshaler interfaces
9 changes: 9 additions & 0 deletions go/common/cbor/cbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ import (
// precompute a CBOR encoding.
type RawMessage = cbor.RawMessage

// Marshaler is the interface implemented by types that can marshal themselves
// into valid CBOR.
type Marshaler = cbor.Marshaler

// Unmarshaler is the interface implemented by types that wish to unmarshal
// CBOR data themselves. The input is a valid CBOR value. UnmarshalCBOR
// must copy the CBOR data if it needs to use it after returning.
type Unmarshaler = cbor.Unmarshaler

var (
encOptions = cbor.EncOptions{
Sort: cbor.SortCanonical,
Expand Down

0 comments on commit 1d88833

Please sign in to comment.