versioning: plugins require version match with config

infer version 0.1.0 when config is missing an explicit "cniVersion" field
This commit is contained in:
Gabe Rosenhouse
2016-09-19 13:00:49 -07:00
parent 64bbcd8cf7
commit fba37620e0
6 changed files with 169 additions and 24 deletions

View File

@ -59,7 +59,7 @@ func PluginSupports(supportedVersions ...string) PluginInfo {
// PluginDecoder can decode the response returned by a plugin's VERSION command
type PluginDecoder struct{}
func (_ *PluginDecoder) Decode(jsonBytes []byte) (PluginInfo, error) {
func (*PluginDecoder) Decode(jsonBytes []byte) (PluginInfo, error) {
var info pluginInfo
err := json.Unmarshal(jsonBytes, &info)
if err != nil {