Skip to content

Commit ee2261b

Browse files
committed
cleanup of empty pre-run
1 parent 0870b68 commit ee2261b

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

cmd/container.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
package cmd
1616

1717
import (
18-
"github.com/spf13/cobra"
1918
"github.com/openconfig/containerz/client"
19+
"github.com/spf13/cobra"
2020
)
2121

2222
var containerCmd = &cobra.Command{
2323
Use: "container",
2424
Short: "General container operations",
2525
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
26-
RootCmd.PersistentPreRun(cmd, args)
2726
var err error
2827
containerzClient, err = client.NewClient(cmd.Context(), addr)
2928
return err

cmd/image.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
package cmd
1616

1717
import (
18-
"github.com/spf13/cobra"
1918
"github.com/openconfig/containerz/client"
19+
"github.com/spf13/cobra"
20+
2021
cpb "github.com/openconfig/gnoi/containerz"
2122
)
2223

@@ -30,7 +31,6 @@ var imageCmd = &cobra.Command{
3031
Use: "image",
3132
Short: "General image operations",
3233
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
33-
RootCmd.PersistentPreRun(cmd, args)
3434
var err error
3535
containerzClient, err = client.NewClient(cmd.Context(), addr)
3636
return err

cmd/plugin.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
package cmd
1616

1717
import (
18-
"github.com/spf13/cobra"
1918
"github.com/openconfig/containerz/client"
19+
"github.com/spf13/cobra"
2020
)
2121

2222
var pluginCmd = &cobra.Command{
2323
Use: "plugin",
2424
Short: "General plugin operations",
2525
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
26-
RootCmd.PersistentPreRun(cmd, args)
2726
var err error
2827
containerzClient, err = client.NewClient(cmd.Context(), addr)
2928
return err

cmd/root.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package cmd
1717

1818
import (
19-
2019
"github.com/spf13/cobra"
2120
)
2221

@@ -28,8 +27,6 @@ var (
2827
var RootCmd = &cobra.Command{
2928
Use: "containerz",
3029
Short: "Containerz suite of CLI tools",
31-
PersistentPreRun: func(cmd *cobra.Command, args []string) {
32-
},
3330
Run: func(command *cobra.Command, args []string) {
3431
command.HelpFunc()(command, args)
3532
},

cmd/volume.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
package cmd
1616

1717
import (
18-
"github.com/spf13/cobra"
1918
"github.com/openconfig/containerz/client"
19+
"github.com/spf13/cobra"
2020
)
2121

2222
var volumesCmd = &cobra.Command{
2323
Use: "volume",
2424
Short: "General volume operations",
2525
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
26-
RootCmd.PersistentPreRun(cmd, args)
2726
var err error
2827
containerzClient, err = client.NewClient(cmd.Context(), addr)
2928
return err

0 commit comments

Comments
 (0)