summaryrefslogtreecommitdiff
path: root/pkg/hooks/0.1.0/hook.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/hooks/0.1.0/hook.go')
-rw-r--r--pkg/hooks/0.1.0/hook.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/pkg/hooks/0.1.0/hook.go b/pkg/hooks/0.1.0/hook.go
index 88a387647..185cc90d1 100644
--- a/pkg/hooks/0.1.0/hook.go
+++ b/pkg/hooks/0.1.0/hook.go
@@ -6,7 +6,6 @@ import (
"errors"
"strings"
- "github.com/containers/libpod/pkg/hooks"
current "github.com/containers/libpod/pkg/hooks/1.0.0"
rspec "github.com/opencontainers/runtime-spec/specs-go"
)
@@ -32,8 +31,9 @@ type Hook struct {
HasBindMounts *bool `json:"hasbindmounts,omitempty"`
}
-func read(content []byte) (hook *current.Hook, err error) {
+func Read(content []byte) (hook *current.Hook, err error) {
var raw Hook
+
if err = json.Unmarshal(content, &raw); err != nil {
return nil, err
}
@@ -86,8 +86,3 @@ func read(content []byte) (hook *current.Hook, err error) {
return hook, nil
}
-
-func init() {
- hooks.Readers[""] = read
- hooks.Readers[Version] = read
-}