Skip to content

Commit

Permalink
types.KillOptions > types.ContainerKillOptions to be consistent
Browse files Browse the repository at this point in the history
Signed-off-by: Yakun Jing <[email protected]>
  • Loading branch information
rkonfj committed Feb 16, 2023
1 parent ce832e3 commit 484c853
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func killAction(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
options := types.KillOptions{
options := types.ContainerKillOptions{
GOptions: globalOptions,
KillSignal: killSignal,
Stdout: cmd.OutOrStdout(),
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/types/container_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type ContainerStartOptions struct {
Attach bool
}

// KillOptions specifies options for `nerdctl (container) kill`.
type KillOptions struct {
// ContainerKillOptions specifies options for `nerdctl (container) kill`.
type ContainerKillOptions struct {
Stdout io.Writer
Stderr io.Writer
// GOptions is the global options
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/container/kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
)

// Kill kills a list of containers
func Kill(ctx context.Context, client *containerd.Client, reqs []string, options types.KillOptions) error {
func Kill(ctx context.Context, client *containerd.Client, reqs []string, options types.ContainerKillOptions) error {
if !strings.HasPrefix(options.KillSignal, "SIG") {
options.KillSignal = "SIG" + options.KillSignal
}
Expand Down

0 comments on commit 484c853

Please sign in to comment.