Remove Gob from plugin spec - not used any more

This commit is contained in:
Bryan Boreham
2017-04-25 12:27:51 +00:00
parent b49ee2ae95
commit f9a1ecbef0

View File

@@ -2,7 +2,6 @@ package xfer
import (
"bytes"
"encoding/gob"
"fmt"
"sort"
@@ -209,23 +208,6 @@ func (*PluginSpecs) UnmarshalJSON(b []byte) error {
panic("UnmarshalJSON shouldn't be used, use CodecDecodeSelf instead")
}
// GobEncode implements gob.Marshaller
func (n PluginSpecs) GobEncode() ([]byte, error) {
buf := bytes.Buffer{}
err := gob.NewEncoder(&buf).Encode(n.toIntermediate())
return buf.Bytes(), err
}
// GobDecode implements gob.Unmarshaller
func (n *PluginSpecs) GobDecode(input []byte) error {
in := []PluginSpec{}
if err := gob.NewDecoder(bytes.NewBuffer(input)).Decode(&in); err != nil {
return err
}
*n = PluginSpecs{}.fromIntermediate(in)
return nil
}
// PluginSpecsByID implements sort.Interface, so we can sort the specs by the
// ID field.
type PluginSpecsByID []PluginSpec