libct: remove deprecated HooksList.RunHooks

This was deprecated in commit e6a4870e4ac40 ("libct: better errors for
hooks"), and users have had ample time to migrate to Hooks.Run since.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
Aleksa Sarai
2026-03-04 20:42:35 +11:00
parent 8fd8e433f8
commit 87b0804345
2 changed files with 1 additions and 11 deletions
+1
View File
@@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `libcontainer/configs.Thawed`
- `libcontainer/configs.NewWeightDevice`
- `libcontainer/configs.NewThrottleDevice`
- `libcontainer/configs.HookList.RunHooks` (#5141)
## [1.4.0] - 2025-11-27
-11
View File
@@ -466,17 +466,6 @@ type Capabilities struct {
Ambient []string `json:"Ambient,omitempty"`
}
// Deprecated: use [Hooks.Run] instead.
func (hooks HookList) RunHooks(state *specs.State) error {
for i, h := range hooks {
if err := h.Run(state); err != nil {
return fmt.Errorf("error running hook #%d: %w", i, err)
}
}
return nil
}
func (hooks *Hooks) UnmarshalJSON(b []byte) error {
var state map[HookName][]CommandHook