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
-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