mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user