File tree Expand file tree Collapse file tree 14 files changed +36
-24
lines changed Expand file tree Collapse file tree 14 files changed +36
-24
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,13 @@ import (
88 "github.com/sirupsen/logrus"
99 "github.com/spf13/cobra"
1010
11+ "github.com/operator-framework/kubectl-operator/internal/cmd/internal/log"
1112 "github.com/operator-framework/kubectl-operator/internal/pkg/action"
12- "github.com/operator-framework/kubectl-operator/internal/pkg/log"
1313)
1414
1515func newCatalogAddCmd (cfg * action.Configuration ) * cobra.Command {
1616 a := action .NewCatalogAdd (cfg )
17+ a .Logf = log .Printf
1718
1819 cmd := & cobra.Command {
1920 Use : "add <name> <index_image>" ,
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import (
1010 v1 "k8s.io/api/core/v1"
1111 "k8s.io/apimachinery/pkg/util/duration"
1212
13+ "github.com/operator-framework/kubectl-operator/internal/cmd/internal/log"
1314 "github.com/operator-framework/kubectl-operator/internal/pkg/action"
14- "github.com/operator-framework/kubectl-operator/internal/pkg/log"
1515)
1616
1717func newCatalogListCmd (cfg * action.Configuration ) * cobra.Command {
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ package cmd
33import (
44 "github.com/spf13/cobra"
55
6+ "github.com/operator-framework/kubectl-operator/internal/cmd/internal/log"
67 "github.com/operator-framework/kubectl-operator/internal/pkg/action"
7- "github.com/operator-framework/kubectl-operator/internal/pkg/log"
88)
99
1010func newCatalogRemoveCmd (cfg * action.Configuration ) * cobra.Command {
File renamed without changes.
Original file line number Diff line number Diff line change @@ -5,12 +5,14 @@ import (
55
66 "github.com/spf13/cobra"
77
8+ "github.com/operator-framework/kubectl-operator/internal/cmd/internal/log"
89 "github.com/operator-framework/kubectl-operator/internal/pkg/action"
9- "github.com/operator-framework/kubectl-operator/internal/pkg/log"
1010)
1111
1212func newOperatorInstallCmd (cfg * action.Configuration ) * cobra.Command {
1313 i := action .NewOperatorInstall (cfg )
14+ i .Logf = log .Printf
15+
1416 cmd := & cobra.Command {
1517 Use : "install <operator>" ,
1618 Short : "Install an operator" ,
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ import (
1212 v1 "k8s.io/api/core/v1"
1313 "k8s.io/apimachinery/pkg/util/duration"
1414
15+ "github.com/operator-framework/kubectl-operator/internal/cmd/internal/log"
1516 "github.com/operator-framework/kubectl-operator/internal/pkg/action"
16- "github.com/operator-framework/kubectl-operator/internal/pkg/log"
1717)
1818
1919func newOperatorListCmd (cfg * action.Configuration ) * cobra.Command {
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ import (
1212 v1 "k8s.io/api/core/v1"
1313 "k8s.io/apimachinery/pkg/util/duration"
1414
15+ "github.com/operator-framework/kubectl-operator/internal/cmd/internal/log"
1516 "github.com/operator-framework/kubectl-operator/internal/pkg/action"
16- "github.com/operator-framework/kubectl-operator/internal/pkg/log"
1717)
1818
1919func newOperatorListAvailableCmd (cfg * action.Configuration ) * cobra.Command {
Original file line number Diff line number Diff line change @@ -3,12 +3,14 @@ package cmd
33import (
44 "github.com/spf13/cobra"
55
6+ "github.com/operator-framework/kubectl-operator/internal/cmd/internal/log"
67 "github.com/operator-framework/kubectl-operator/internal/pkg/action"
7- "github.com/operator-framework/kubectl-operator/internal/pkg/log"
88)
99
1010func newOperatorUninstallCmd (cfg * action.Configuration ) * cobra.Command {
1111 u := action .NewOperatorUninstall (cfg )
12+ u .Logf = log .Printf
13+
1214 cmd := & cobra.Command {
1315 Use : "uninstall <operator>" ,
1416 Short : "Uninstall an operator" ,
Original file line number Diff line number Diff line change 55
66 "github.com/spf13/cobra"
77
8+ "github.com/operator-framework/kubectl-operator/internal/cmd/internal/log"
89 "github.com/operator-framework/kubectl-operator/internal/pkg/action"
9- "github.com/operator-framework/kubectl-operator/internal/pkg/log"
1010)
1111
1212func newOperatorUpgradeCmd (cfg * action.Configuration ) * cobra.Command {
Original file line number Diff line number Diff line change @@ -3,10 +3,16 @@ package cmd
33import (
44 "github.com/spf13/cobra"
55
6+ "github.com/operator-framework/kubectl-operator/internal/cmd/internal/log"
67 "github.com/operator-framework/kubectl-operator/internal/pkg/action"
78)
89
9- func New () * cobra.Command {
10+ func Execute () {
11+ if err := newCmd ().Execute (); err != nil {
12+ log .Fatal (err )
13+ }
14+ }
15+ func newCmd () * cobra.Command {
1016 cmd := & cobra.Command {
1117 Use : "operator" ,
1218 Short : "Manage operators in a cluster from the command line" ,
You can’t perform that action at this time.
0 commit comments