You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
316 B
21 lines
316 B
package gob
|
|
|
|
import (
|
|
"encoding/gob"
|
|
"io"
|
|
|
|
"gitoa.ru/go-4devs/encoding"
|
|
)
|
|
|
|
var (
|
|
_ encoding.Decode = Decode
|
|
_ encoding.Encode = Encode
|
|
)
|
|
|
|
func Decode(r io.Reader, v interface{}) error {
|
|
return gob.NewDecoder(r).Decode(v)
|
|
}
|
|
|
|
func Encode(w io.Writer, v interface{}) error {
|
|
return gob.NewEncoder(w).Encode(v)
|
|
}
|
|
|