rename internal pkg

This commit is contained in:
ReallyLiri 2024-06-13 11:47:06 +03:00
parent 4997a261dc
commit 33119d980e
44 changed files with 50 additions and 50 deletions

View File

@ -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

View File

@ -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.

View File

@ -20,7 +20,7 @@ import (
"os"
"strings"
"github.com/ahmetb/kubectx/internal/cmdutil"
"github.com/ahmetb/kubectx/core/cmdutil"
)
// UnsupportedOp indicates an unsupported flag.

View File

@ -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 {

View File

@ -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.

View File

@ -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"
)

View File

@ -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.

View File

@ -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) {

View File

@ -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) {

View File

@ -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.

View File

@ -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.

View File

@ -20,7 +20,7 @@ import (
"github.com/pkg/errors"
"github.com/ahmetb/kubectx/internal/kubeconfig"
"github.com/ahmetb/kubectx/core/kubeconfig"
)
type CurrentOp struct{}

View File

@ -20,7 +20,7 @@ import (
"os"
"strings"
"github.com/ahmetb/kubectx/internal/cmdutil"
"github.com/ahmetb/kubectx/core/cmdutil"
)
// UnsupportedOp indicates an unsupported flag.

View File

@ -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 {

View File

@ -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{}

View File

@ -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"
)

View File

@ -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")

View File

@ -21,7 +21,7 @@ import (
"strings"
"testing"
"github.com/ahmetb/kubectx/internal/testutil"
"github.com/ahmetb/kubectx/core/testutil"
)
func TestNSFile(t *testing.T) {

View File

@ -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 {

View File

@ -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) {

View File

@ -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.

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -15,7 +15,7 @@
package kubeconfig
import (
"github.com/ahmetb/kubectx/internal/cmdutil"
"github.com/ahmetb/kubectx/core/cmdutil"
"os"
"path/filepath"

View File

@ -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) {

View File

@ -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) {

View File

@ -19,7 +19,7 @@ import (
"github.com/fatih/color"
"github.com/ahmetb/kubectx/internal/env"
"github.com/ahmetb/kubectx/core/env"
)
var (

View File

@ -19,7 +19,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/ahmetb/kubectx/internal/testutil"
"github.com/ahmetb/kubectx/core/testutil"
)
var (