diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2015-06-29 16:58:03 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2015-06-29 16:58:03 +0200 |
commit | c88b115f961c13e1700f8c2e64c59752220ebea4 (patch) | |
tree | db45095f3171fe34c8b050fe858911886c50d258 /ber | |
parent | dfb9eb36d88479c8c229c959b47e6d91f17a7c4a (diff) |
Redefine Interface
Diffstat (limited to 'ber')
-rw-r--r-- | ber/marshal.go | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/ber/marshal.go b/ber/marshal.go index 90ef562..569c33d 100644 --- a/ber/marshal.go +++ b/ber/marshal.go @@ -3,15 +3,23 @@ package ber import ( "bytes" "reflect" - "runtime" ) -type encodeState struct { - bytes.Buffer +type Marshaler interface { + Marshal() ([]byte, error) } -type Marshaler interface { - MarschalBER() ([]byte, error) +type Unarshaler interface { + Unarshal([]byte) error +} + +type ASN1 interface { + Marshaler + Unmarshaler +} + +type encodeState struct { + bytes.Buffer } func Marshal(v interface{}) ([]byte, error) { |