mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-15 19:41:02 +00:00
Remove Gob from plugin spec - not used any more
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user