Skip to content

Commit

Permalink
chore(pkg/factory): moving factory
Browse files Browse the repository at this point in the history
  • Loading branch information
leodido authored and fntlnz committed Nov 25, 2018
1 parent e941ced commit 754a59b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/fntlnz/kubectl-trace/factory"
"github.com/fntlnz/kubectl-trace/pkg/factory"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
// "k8s.io/kubernetes/pkg/kubectl/util/templates"
Expand Down
10 changes: 4 additions & 6 deletions pkg/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import (
"fmt"

"github.com/davecgh/go-spew/spew"
"github.com/fntlnz/kubectl-trace/factory"
"github.com/fntlnz/kubectl-trace/pkg/factory"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
// "k8s.io/kubernetes/pkg/kubectl/util/templates"
)

var (
Expand Down Expand Up @@ -37,7 +36,8 @@ var (
type RunOptions struct {
genericclioptions.IOStreams

namespace string
namespace string
explicitNamespace bool

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

// Complete completes the setup of the command.
func (o *RunOptions) Complete(factory factory.Factory, cmd *cobra.Command, args []string) error {
spew.Dump(o)

o.namespace, _, _ = factory.ToRawKubeConfigLoader().Namespace()
o.namespace, o.explicitNamespace, _ = factory.ToRawKubeConfigLoader().Namespace()

spew.Dump(o)

Expand Down
5 changes: 1 addition & 4 deletions pkg/cmd/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ package cmd
import (
"fmt"

"github.com/fntlnz/kubectl-trace/factory"
"github.com/fntlnz/kubectl-trace/pkg/factory"

"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
// cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
// "k8s.io/kubernetes/pkg/kubectl/util/i18n"
// "k8s.io/kubectl/pkg/pluginutils"
)

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

0 comments on commit 754a59b

Please sign in to comment.