mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-08-29 20:22:58 +00:00
rename internal pkg
This commit is contained in:
parent
4997a261dc
commit
33119d980e
@ -20,7 +20,7 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
)
|
||||
|
||||
// CurrentOp prints the current context
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
// DeleteOp indicates intention to delete contexts.
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
)
|
||||
|
||||
// UnsupportedOp indicates an unsupported flag.
|
||||
|
@ -24,10 +24,10 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/internal/env"
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/env"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
type InteractiveSwitchOp struct {
|
||||
|
@ -21,9 +21,9 @@ import (
|
||||
"facette.io/natsort"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
// ListOp describes listing contexts.
|
||||
|
@ -19,9 +19,9 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/internal/env"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/env"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
"github.com/fatih/color"
|
||||
)
|
||||
|
||||
|
@ -20,8 +20,8 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
// RenameOp indicates intention to rename contexts.
|
||||
|
@ -21,7 +21,7 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
)
|
||||
|
||||
func kubectxPrevCtxFile() (string, error) {
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
func Test_readLastContext_nonExistingFile(t *testing.T) {
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
// SwitchOp indicates intention to switch contexts.
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
// UnsetOp indicates intention to remove current-context preference.
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
)
|
||||
|
||||
type CurrentOp struct{}
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
)
|
||||
|
||||
// UnsupportedOp indicates an unsupported flag.
|
||||
|
@ -24,10 +24,10 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/internal/env"
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/env"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
type InteractiveSwitchOp struct {
|
||||
|
@ -26,8 +26,8 @@ import (
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
type ListOp struct{}
|
||||
|
@ -19,9 +19,9 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/internal/env"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/env"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
"github.com/fatih/color"
|
||||
)
|
||||
|
||||
|
@ -22,7 +22,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
)
|
||||
|
||||
var defaultDir = filepath.Join(cmdutil.HomeDir(), ".kube", "kubens")
|
||||
|
@ -21,7 +21,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
func TestNSFile(t *testing.T) {
|
||||
|
@ -23,8 +23,8 @@ import (
|
||||
errors2 "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
type SwitchOp struct {
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
"github.com/ahmetb/kubectx/core/printer"
|
||||
)
|
||||
|
||||
func PrintDeprecatedEnvWarnings(out io.Writer, vars []string) {
|
@ -20,7 +20,7 @@ import (
|
||||
|
||||
"github.com/mattn/go-isatty"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/env"
|
||||
"github.com/ahmetb/kubectx/core/env"
|
||||
)
|
||||
|
||||
// isTerminal determines if given fd is a TTY.
|
@ -17,7 +17,7 @@ package cmdutil
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
func Test_homeDir(t *testing.T) {
|
@ -19,7 +19,7 @@ import (
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
func TestKubeconfig_DeleteContextEntry_errors(t *testing.T) {
|
@ -19,7 +19,7 @@ import (
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
func TestKubeconfig_ContextNames(t *testing.T) {
|
@ -17,7 +17,7 @@ package kubeconfig
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
func TestKubeconfig_GetCurrentContext(t *testing.T) {
|
@ -19,7 +19,7 @@ import (
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
func TestParse(t *testing.T) {
|
@ -15,7 +15,7 @@
|
||||
package kubeconfig
|
||||
|
||||
import (
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
@ -15,13 +15,13 @@
|
||||
package kubeconfig
|
||||
|
||||
import (
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/core/cmdutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
func Test_kubeconfigPath(t *testing.T) {
|
@ -19,7 +19,7 @@ import (
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
func TestKubeconfig_NamespaceOfContext_ctxNotFound(t *testing.T) {
|
@ -19,7 +19,7 @@ import (
|
||||
|
||||
"github.com/fatih/color"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/env"
|
||||
"github.com/ahmetb/kubectx/core/env"
|
||||
)
|
||||
|
||||
var (
|
@ -19,7 +19,7 @@ import (
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/testutil"
|
||||
"github.com/ahmetb/kubectx/core/testutil"
|
||||
)
|
||||
|
||||
var (
|
Loading…
Reference in New Issue
Block a user