parser: generalize API for decoding serializable types
This commit is contained in:
12
parser/serializable.go
Normal file
12
parser/serializable.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package parser
|
||||
|
||||
import "encoding"
|
||||
|
||||
type Serializable interface {
|
||||
encoding.BinaryMarshaler
|
||||
encoding.BinaryUnmarshaler
|
||||
}
|
||||
|
||||
type Decoder interface {
|
||||
Decode(v Serializable) error
|
||||
}
|
||||
Reference in New Issue
Block a user