virtcontainers/hook: fix HookState

`HookState` was removed from libcontainer, fortunately it was an alias for
`specs.State`, use `specs.State` instead.

Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes 2019-12-11 19:38:30 +00:00
parent f372b85848
commit 776da0878e

View File

@ -13,7 +13,7 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/opencontainers/runc/libcontainer/configs" specs "github.com/opencontainers/runtime-spec/specs-go"
) )
var logFile = "/tmp/mock_hook.log" var logFile = "/tmp/mock_hook.log"
@ -61,7 +61,7 @@ func main() {
os.Exit(1) os.Exit(1)
} }
var state configs.HookState var state specs.State
err = json.Unmarshal(stateBuf, &state) err = json.Unmarshal(stateBuf, &state)
if err != nil { if err != nil {
fmt.Fprintf(f, "Could not unmarshal HookState json: %s\n", err) fmt.Fprintf(f, "Could not unmarshal HookState json: %s\n", err)