repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/crd_test.go | internal/render/crd_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestCustomResourceDefinitionRender(t *t... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/cr_test.go | internal/render/cr_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestClusterRoleRender(t *testing.T) {
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/subject.go | internal/render/subject.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// Subject renders a rbac to screen.
type Subject struct {
Base... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/rob_test.go | internal/render/rob_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestRoleBindingRender(t *testing.T) {
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/ro.go | internal/render/ro.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
)
// Role rende... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/context_test.go | internal/render/context_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"k8s.io/client-go/tools/clientcmd/api"
)
func... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/crd.go | internal/render/crd.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"errors"
"fmt"
"log/slog"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/slogs"
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/benchmark.go | internal/render/benchmark.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"errors"
"fmt"
"os"
"regexp"
"strconv"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
"github.com/derailed/tview"
metav1 "k8s.io/apimachi... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/pod.go | internal/render/pod.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"context"
"fmt"
"log/slog"
"strconv"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/config"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/slogs"
"g... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/rob.go | internal/render/rob.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
)
va... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/container_test.go | internal/render/container_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"fmt"
"testing"
"time"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1"
"k8s.i... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/ep.go | internal/render/ep.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/ns_test.go | internal/render/ns_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/derailed/tcell/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNSC... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/dp.go | internal/render/dp.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
"github.com/derailed/tview"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/pvc_test.go | internal/render/pvc_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestPersistentVolumeClaimRender(t *test... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/screen_dump.go | internal/render/screen_dump.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"os"
"path/filepath"
"time"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/durat... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/ep_test.go | internal/render/ep_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestEndpointsRender(t *testing.T) {
c ... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/ds.go | internal/render/ds.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tview"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/ap... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/node_test.go | internal/render/node_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/eps_test.go | internal/render/eps_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestEndpointSliceRender(t *testing.T) {... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/helpers_test.go | internal/render/helpers_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"encoding/json"
"fmt"
"os"
"testing"
"time"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
metav1 "k8s.i... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/crb_test.go | internal/render/crb_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestClusterRoleBindingRender(t *testing... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/ns.go | internal/render/ns.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"context"
"errors"
"fmt"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/slogs"
"github.com/derailed/tcell/v2"
"golang.org/x/exp/slog"
v... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/node_int_test.go | internal/render/node_int_test.go | package render
import (
"testing"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
mv1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1"
)
func Test_extractNodeGPU(t *testing.T) {
uu := map[string]struct {
rl v... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/port_forward_test.go | internal/render/port_forward_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"time"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestPortForwardRender(t *testin... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/hpa.go | internal/render/hpa.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"strconv"
"strings"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
)
// HorizontalPodAutoscaler renders a K8s HorizontalPodAutoscaler to screen.
type HorizontalPodAutoscaler struct {
Table
}
//... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/alias_test.go | internal/render/alias_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/derailed/tcell/v2"
"github.com/stretchr/testify/assert"
"github.co... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/pod_int_test.go | internal/render/pod_int_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"testing"
"time"
"github.com/derailed/k9s/internal/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1"
res "k8s.io/apimachinery/pkg/api/resource"
metav1 "k8... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/svc.go | internal/render/svc.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"sort"
"strconv"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/sa.go | internal/render/sa.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
)
var de... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/secret.go | internal/render/secret.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
)
var de... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/reference_test.go | internal/render/reference_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
f... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/benchmark_int_test.go | internal/render/benchmark_int_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"log/slog"
"os"
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func init() {
slog.SetDefault(slog.New(slog.DiscardHandler))
}
func Test... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/img_scan.go | internal/render/img_scan.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strings"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/vul"
"github.com/derailed/tcell/v2"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
const (
CVEP... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/sc.go | internal/render/sc.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
storagev1 "k8s.io/api/storage/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/table_int_test.go | internal/render/table_int_test.go | package render
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func Test_defaultHeader(t *testing.T) {
uu := map[string]struct {
cdefs []metav1.TableColumnDefinition
e model1.Header
}{
"empty": {
e: m... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/pdb.go | internal/render/pdb.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tview"
v1 "k8s.io/api/policy/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apim... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/pdb_test.go | internal/render/pdb_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestPodDisruptionBudgetRender(t *testin... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/context.go | internal/render/context.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"log/slog"
"os"
"strings"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/tools/clientcmd/api... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/section.go | internal/render/section.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
// Level tracks lint check level.
type Level int
const (
// OkLevel denotes no linting issues.
OkLevel Level = iota
// InfoLevel denotes FIY linting issues.
InfoLevel
// WarnLevel denotes a warning issue.
WarnLevel
// ErrorLevel... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/dp_test.go | internal/render/dp_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestDpRender(t *testing.T) {
c := rend... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/svc_test.go | internal/render/svc_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestServiceRender(t *testing.T) {
c :=... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/sc_test.go | internal/render/sc_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestStorageClassRender(t *testing.T) {
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/np.go | internal/render/np.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
netv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/un... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/np_test.go | internal/render/np_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNetworkPolicyRender(t *testing.T) {... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/cust_cols_test.go | internal/render/cust_cols_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"errors"
"fmt"
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tview"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"k8s.io/client-go/util/jsonpath"
)
func TestPar... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/sts.go | internal/render/sts.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
)
va... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/eps.go | internal/render/eps.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
discoveryv1 "k8s.io/api/discovery/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachine... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/container_int_test.go | internal/render/container_int_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"testing"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
mv1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1"
)
func Test_gatherContainerMX(t *testing.T) {
uu := map[st... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/pv.go | internal/render/pv.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"path"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/cronjob_test.go | internal/render/cronjob_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestCronJobRender(t *testing.T) {
c :=... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/cronjob.go | internal/render/cronjob.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
batchv1 "k8s.io/api/batch/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/policy_int_test.go | internal/render/policy_int_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_cleanseResource(t *testing.T) {
uu := map[string]struct {
r, e string
}{
"empty": {},
"single": {
r: "fred",
e: "fred",
},
"grp/res": {
r: "fre... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/helpers.go | internal/render/helpers.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"context"
"log/slog"
"sort"
"strconv"
"strings"
"time"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/slogs"
"github.com/derailed/k9s/internal/vul"
"github.com/derailed/tview"
"github.co... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/cr.go | internal/render/cr.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
)
// ClusterRol... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/rs.go | internal/render/rs.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"strings"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tview"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/pv_test.go | internal/render/pv_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestPersistentVolumeRender(t *testing.T... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/dir.go | internal/render/dir.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"context"
"fmt"
"os"
"github.com/derailed/k9s/internal/config"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// D... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/reference.go | internal/render/reference.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// Reference renders ... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/sts_test.go | internal/render/sts_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestStatefulSetRender(t *testing.T) {
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/hpa_test.go | internal/render/hpa_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
"github.com/derailed/tview"
"github.com/stretchr/testify/assert"
)
func TestHorizontalPodAutoscalerColorer(t *testing.T) {
hpaHeader := ... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/cm.go | internal/render/cm.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package render
import (
"fmt"
"strconv"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/model1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
)
// Con... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/helm/chart.go | internal/render/helm/chart.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package helm
import (
"context"
"fmt"
"log/slog"
"strconv"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/config"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
"github.com/de... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/render/helm/history.go | internal/render/helm/history.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package helm
import (
"context"
"fmt"
"strconv"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/config"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/k9s/internal/render"
)
// History renders a His... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/row_test.go | internal/model1/row_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1_test
import (
"fmt"
"reflect"
"testing"
"time"
"github.com/derailed/k9s/internal/model1"
"github.com/stretchr/testify/assert"
)
func BenchmarkRowCustomize(b *testing.B) {
row := model1.Row{ID: "fred", Fields: model1.Fields{"f1"... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/pool_test.go | internal/model1/pool_test.go | package model1_test
import (
"context"
"fmt"
"sync/atomic"
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/stretchr/testify/assert"
)
func TestWorkerPoolPlain(t *testing.T) {
p := model1.NewWorkerPool(context.Background(), 2)
var c atomic.Int32
for range 10 {
p.Add(func(ctx context.Contex... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/row_event.go | internal/model1/row_event.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import (
"fmt"
"log/slog"
"sort"
)
type ReRangeFn func(int, RowEvent) bool
// ResEvent represents a resource event.
type ResEvent int
// RowEvent tracks resource instance events.
type RowEvent struct {
Kind ResEvent
Row Row... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/types.go | internal/model1/types.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import (
"context"
"github.com/derailed/k9s/internal/config"
"github.com/derailed/tcell/v2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
NAValue = "na"
// EventUnchanged notifies listener resource has not changed.
E... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/delta.go | internal/model1/delta.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import "reflect"
// DeltaRow represents a collection of row deltas between old and new row.
type DeltaRow []string
// NewDeltaRow computes the delta between 2 rows.
func NewDeltaRow(o, n Row, h Header) DeltaRow {
deltas := make(Delta... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/table_data_test.go | internal/model1/table_data_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import (
"log/slog"
"testing"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/config"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/util/sets"
)
func init() {
slog.SetDefault(slog.New... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/color_test.go | internal/model1/color_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/derailed/tcell/v2"
"github.com/stretchr/testify/assert"
)
func TestDefaultColorer(t *testing.T) {
uu := map[string]struct {
re model1.RowEvent
e t... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/delta_test.go | internal/model1/delta_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/stretchr/testify/assert"
)
func TestDeltaLabelize(t *testing.T) {
uu := map[string]struct {
o model1.Row
n model1.Row
e model1.DeltaRow
}{
"sam... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/helpers_test.go | internal/model1/helpers_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import (
"math"
"testing"
"github.com/stretchr/testify/assert"
)
func TestSortLabels(t *testing.T) {
uu := map[string]struct {
labels string
e [][]string
}{
"simple": {
labels: "a=b,c=d",
e: [][]string{
{"a",... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/test_helper_test.go | internal/model1/test_helper_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1_test
import (
"fmt"
"time"
)
func testTime() time.Time {
t, err := time.Parse(time.RFC3339, "2018-12-14T10:36:43.326972-07:00")
if err != nil {
fmt.Println("TestTime Failed", err)
}
return t
}
| go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/row_event_test.go | internal/model1/row_event_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1_test
import (
"testing"
"time"
"github.com/derailed/k9s/internal/model1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestRowEventCustomize(t *testing.T) {
uu := map[string]struct {
re1, e ... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/header.go | internal/model1/header.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import (
"fmt"
"log/slog"
"reflect"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/slogs"
"k8s.io/apimachinery/pkg/util/sets"
)
const ageCol = "AGE"
type Attrs struct {
Align int
Decorator Dec... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/header_test.go | internal/model1/header_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1_test
import (
"testing"
"github.com/derailed/k9s/internal/model1"
"github.com/stretchr/testify/assert"
)
func TestHeaderMapIndices(t *testing.T) {
uu := map[string]struct {
h1 model1.Header
cols []string
wide bool
e [... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/color.go | internal/model1/color.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import "github.com/derailed/tcell/v2"
var (
// ModColor row modified color.
ModColor tcell.Color
// AddColor row added color.
AddColor tcell.Color
// PendingColor row added color.
PendingColor tcell.Color
// ErrColor row err ... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/pool.go | internal/model1/pool.go | package model1
import (
"context"
"log/slog"
"sync"
"github.com/derailed/k9s/internal/slogs"
)
type jobFn func(ctx context.Context) error
type WorkerPool struct {
semC chan struct{}
errC chan error
ctx context.Context
cancelFn context.CancelFunc
mx sync.RWMutex
wg sync.WaitGroup
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/rows.go | internal/model1/rows.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import "sort"
// Rows represents a collection of rows.
type Rows []Row
// Delete removes an element by id.
func (rr Rows) Delete(id string) Rows {
idx, ok := rr.Find(id)
if !ok {
return rr
}
if idx == 0 {
return rr[1:]
}
if... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/table_data.go | internal/model1/table_data.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import (
"context"
"errors"
"fmt"
"log/slog"
"regexp"
"strings"
"sync"
"github.com/derailed/k9s/internal"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/config"
"github.com/derailed/k9s/internal/... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/helpers.go | internal/model1/helpers.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import (
"context"
"fmt"
"log/slog"
"math"
"sort"
"strings"
"github.com/fvbommel/sortorder"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
const poolS... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/fields.go | internal/model1/fields.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
import "reflect"
// Fields represents a collection of row fields.
type Fields []string
// Customize returns a subset of fields.
func (f Fields) Customize(cols []int, out Fields) {
for i, c := range cols {
if c < 0 {
out[i] = NAV... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model1/row.go | internal/model1/row.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package model1
// Row represents a collection of columns.
type Row struct {
ID string
Fields Fields
}
// NewRow returns a new row with initialized fields.
func NewRow(size int) Row {
return Row{Fields: make([]string, size)}
}
// Labelize retu... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/files_test.go | internal/config/files_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config_test
import (
"os"
"path/filepath"
"testing"
"github.com/adrg/xdg"
"github.com/derailed/k9s/internal/config"
"github.com/derailed/k9s/internal/config/data"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/requi... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/views_int_test.go | internal/config/views_int_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
"testing"
"github.com/derailed/k9s/internal/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestCustomView_getVS(t *testing.T) {
uu := map[string]struct {
cv *CustomView
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/flags.go | internal/config/flags.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
const (
// DefaultRefreshRate represents the refresh interval.
DefaultRefreshRate float32 = 2.0 // secs
// DefaultLogLevel represents the default log level.
DefaultLogLevel = "info"
// DefaultCommand represents the default comman... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/hotkey.go | internal/config/hotkey.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
"errors"
"io/fs"
"log/slog"
"os"
"github.com/derailed/k9s/internal/config/data"
"github.com/derailed/k9s/internal/config/json"
"github.com/derailed/k9s/internal/slogs"
"gopkg.in/yaml.v3"
)
// HotKeys represents a coll... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/k9s_int_test.go | internal/config/k9s_int_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_k9sOverrides(t *testing.T) {
var (
trueVal = true
cmd = "po"
dir = "/tmp/blee"
)
uu := map[string]struct {
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/refresh_rate_test.go | internal/config/refresh_rate_test.go | package config
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
)
func TestRefreshRateBackwardCompatibility(t *testing.T) {
tests := map[string]struct {
yamlContent string
expected float32
}{
"integer_value": {
yamlContent: `refreshRat... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/alias.go | internal/config/alias.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
"errors"
"io/fs"
"log/slog"
"os"
"strings"
"sync"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/config/data"
"github.com/derailed/k9s/internal/config/json"
"github.com/derailed/k9s/inter... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/types.go | internal/config/types.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
const (
defaultRefreshRate = 2
defaultMaxConnRetry = 5
// CPU tracks cpu usage.
CPU = "cpu"
// MEM tracks memory usage.
MEM = "memory"
)
// UI tracks ui specific configs.
type UI struct {
// EnableMouse toggles mouse support.... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/threshold_test.go | internal/config/threshold_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config_test
import (
"testing"
"github.com/derailed/k9s/internal/config"
"github.com/stretchr/testify/assert"
)
func TestSeverityValidate(t *testing.T) {
uu := map[string]struct {
d, e *config.Severity
}{
"default": {
d: config.N... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/config.go | internal/config/config.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
"errors"
"fmt"
"io/fs"
"log/slog"
"os"
"time"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/config/data"
"github.com/derailed/k9s/internal/config/json"
"github.com/derailed/k9s/internal/... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/benchmark.go | internal/config/benchmark.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
"net/http"
"os"
"gopkg.in/yaml.v3"
)
// K9sBench the name of the benchmarks config file.
var K9sBench = "bench"
type (
// Bench tracks K9s styling options.
Bench struct {
Benchmarks *Benchmarks `yaml:"benchmarks"`
}
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/color_test.go | internal/config/color_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config_test
import (
"testing"
"github.com/derailed/k9s/internal/config"
"github.com/derailed/tcell/v2"
"github.com/stretchr/testify/assert"
)
func TestColors(t *testing.T) {
uu := map[string]struct {
cc []string
ee []tcell.Color
}... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/k9s.go | internal/config/k9s.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
"errors"
"fmt"
"io/fs"
"log/slog"
"net/http"
"net/url"
"os"
"path/filepath"
"sync"
"time"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/config/data"
"github.com/derailed/k9s/internal/... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/plugin_test.go | internal/config/plugin_test.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestPluginLoad(t *testing.T) {
uu := map[string]struct {
path string
err string
ee Plugins
}{
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/styles.go | internal/config/styles.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
"fmt"
"os"
"github.com/derailed/k9s/internal/config/data"
"github.com/derailed/k9s/internal/config/json"
"github.com/derailed/tcell/v2"
"github.com/derailed/tview"
"gopkg.in/yaml.v3"
)
// StyleListener represents a ski... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
derailed/k9s | https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/config/shell_pod.go | internal/config/shell_pod.go | // SPDX-License-Identifier: Apache-2.0
// Copyright Authors of K9s
package config
import (
v1 "k8s.io/api/core/v1"
)
const defaultDockerShellImage = "busybox:1.37.0"
// Limits represents resource limits.
type Limits map[v1.ResourceName]string
// ShellPod represents k9s shell configuration.
type ShellPod struct {
... | go | Apache-2.0 | 3784c12ae74593e8aca597c3c347e8714ad3d6b7 | 2026-01-07T08:36:21.587988Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.