pkg/invoke: refactor plugin exec and backfill unit tests

This commit is contained in:
Gabe Rosenhouse
2016-09-02 13:12:14 -04:00
parent adf28a84c6
commit dea1c6e44d
9 changed files with 413 additions and 137 deletions

View File

@ -61,7 +61,9 @@ func PluginSupports(supportedVersions ...string) PluginInfo {
}
}
func Decode(jsonBytes []byte) (PluginInfo, error) {
type Decoder struct{}
func (_ *Decoder) Decode(jsonBytes []byte) (PluginInfo, error) {
var info simple
err := json.Unmarshal(jsonBytes, &info)
if err != nil {