From 4126b807cce8bd4abdcf5893712d3a971e65a249 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 2 Apr 2021 11:08:24 +0200 Subject: [PATCH] libcontainer/configs: add missing type for hooknames Commit ccdd75760c1f2d2be2dbb21522b67ceab28fd901 introduced the HookName type for hooks, but only set this type on the Prestart const, but not for the other hooks. Signed-off-by: Sebastiaan van Stijn --- libcontainer/configs/config.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libcontainer/configs/config.go b/libcontainer/configs/config.go index 3808f79a8..042ba1a2e 100644 --- a/libcontainer/configs/config.go +++ b/libcontainer/configs/config.go @@ -222,25 +222,25 @@ const ( // the runtime environment has been created but before the pivot_root has been executed. // CreateRuntime is called immediately after the deprecated Prestart hook. // CreateRuntime commands are called in the Runtime Namespace. - CreateRuntime = "createRuntime" + CreateRuntime HookName = "createRuntime" // CreateContainer commands MUST be called as part of the create operation after // the runtime environment has been created but before the pivot_root has been executed. // CreateContainer commands are called in the Container namespace. - CreateContainer = "createContainer" + CreateContainer HookName = "createContainer" // StartContainer commands MUST be called as part of the start operation and before // the container process is started. // StartContainer commands are called in the Container namespace. - StartContainer = "startContainer" + StartContainer HookName = "startContainer" // Poststart commands are executed after the container init process starts. // Poststart commands are called in the Runtime Namespace. - Poststart = "poststart" + Poststart HookName = "poststart" // Poststop commands are executed after the container init process exits. // Poststop commands are called in the Runtime Namespace. - Poststop = "poststop" + Poststop HookName = "poststop" ) type Capabilities struct {