Skip to content

Commit 754a59b

Browse files
leodidofntlnz
authored andcommitted
chore(pkg/factory): moving factory
1 parent e941ced commit 754a59b

File tree

6 files changed

+6
-11
lines changed

6 files changed

+6
-11
lines changed

pkg/cmd/get.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/fntlnz/kubectl-trace/factory"
6+
"github.com/fntlnz/kubectl-trace/pkg/factory"
77
"github.com/spf13/cobra"
88
"k8s.io/cli-runtime/pkg/genericclioptions"
99
// "k8s.io/kubernetes/pkg/kubectl/util/templates"

pkg/cmd/run.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import (
44
"fmt"
55

66
"github.com/davecgh/go-spew/spew"
7-
"github.com/fntlnz/kubectl-trace/factory"
7+
"github.com/fntlnz/kubectl-trace/pkg/factory"
88
"github.com/spf13/cobra"
99
"k8s.io/cli-runtime/pkg/genericclioptions"
10-
// "k8s.io/kubernetes/pkg/kubectl/util/templates"
1110
)
1211

1312
var (
@@ -37,7 +36,8 @@ var (
3736
type RunOptions struct {
3837
genericclioptions.IOStreams
3938

40-
namespace string
39+
namespace string
40+
explicitNamespace bool
4141

4242
// Local to this command
4343
container string
@@ -122,9 +122,7 @@ func (o *RunOptions) Validate(cmd *cobra.Command, args []string) error {
122122

123123
// Complete completes the setup of the command.
124124
func (o *RunOptions) Complete(factory factory.Factory, cmd *cobra.Command, args []string) error {
125-
spew.Dump(o)
126-
127-
o.namespace, _, _ = factory.ToRawKubeConfigLoader().Namespace()
125+
o.namespace, o.explicitNamespace, _ = factory.ToRawKubeConfigLoader().Namespace()
128126

129127
spew.Dump(o)
130128

pkg/cmd/trace.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/fntlnz/kubectl-trace/factory"
6+
"github.com/fntlnz/kubectl-trace/pkg/factory"
77

88
"github.com/spf13/cobra"
99
"k8s.io/cli-runtime/pkg/genericclioptions"
10-
// cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
11-
// "k8s.io/kubernetes/pkg/kubectl/util/i18n"
12-
// "k8s.io/kubectl/pkg/pluginutils"
1310
)
1411

1512
// Possible resources include (case insensitive):
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)