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/helpers.go
internal/helpers.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package internal import ( "regexp" "strings" "github.com/derailed/k9s/internal/view/cmd" ) var ( fuzzyRx = regexp.MustCompile(`\A-f\s?([\w-]+)\b`) labelRx = regexp.MustCompile(`\A\-l`) ) // Helpers... // IsInverseSelector checks if inverse ch...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/slogs/child.go
internal/slogs/child.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package slogs import "log/slog" // CLog returns a child logger. func CLog(subsys string) *slog.Logger { return slog.With(Subsys, subsys) }
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/slogs/keys.go
internal/slogs/keys.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package slogs const ( // Error tracks an error logger key. Error = "error" // Stack tracks a stack logger key. Stack = "stack" // Subsys tracks a subsystem logger key. Subsys = "subsys" // SchemaFile tracks a schema file logger key. SchemaF...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/generic.go
internal/dao/generic.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/describe.go
internal/dao/describe.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "log/slog" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/slogs" "k8s.io/kubectl/pkg/describe" ) // Describe describes a resource. func Describe(c client.Connection, gvr *client.GVR, path string)...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/log_options_test.go
internal/dao/log_options_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "testing" "github.com/derailed/k9s/internal/dao" "github.com/stretchr/testify/assert" ) func TestLogOptionsToggleAllContainers(t *testing.T) { uu := map[string]struct { opts dao.LogOptions co string want bool }...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/patch_test.go
internal/dao/patch_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "testing" "github.com/stretchr/testify/require" ) func TestGetTemplateJsonPatch(t *testing.T) { type args struct { imageSpecs ImageSpecs } uu := map[string]struct { args args want string wantErr bool }{ "si...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/job.go
internal/dao/job.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "log/slog" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/slogs" batchv1 "k8s.io/api/batc...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/registry.go
internal/dao/registry.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "fmt" "log/slog" "maps" "slices" "strings" "sync" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/slogs" apiext "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apima...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/workload.go
internal/dao/workload.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "encoding/json" "errors" "fmt" "log/slog" "strconv" "strings" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/in...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/dir_test.go
internal/dao/dir_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "context" "testing" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/dao" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestNewDir(t *testing.T) { d := dao.NewD...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/rbac.go
internal/dao/rbac.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.i...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/log_items.go
internal/dao/log_items.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "bytes" "fmt" "regexp" "strings" "sync" "github.com/derailed/k9s/internal" "github.com/sahilm/fuzzy" ) type podColors map[string]string var podPalette = []string{ "teal", "green", "purple", "lime", "blue", "yellow"...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/table.go
internal/dao/table.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructur...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/pod_test.go
internal/dao/pod_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "testing" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestGetDefaultContainer(t *testing.T) { uu := map[string]struct { po *v1.Pod wantCon...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/container.go
internal/dao/container.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "strconv" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" 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/dao/node.go
internal/dao/node.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "io" "log/slog" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/slogs" v1 "k8s.io/api/cor...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/non_resource.go
internal/dao/non_resource.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "sync" "github.com/derailed/k9s/internal/client" "k8s.io/apimachinery/pkg/runtime" ) // NonResource represents a non k8s resource. type NonResource struct { Factory gvr *client.GVR mx sync...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/alias.go
internal/dao/alias.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "sort" "strings" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/render" "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/dao/types.go
internal/dao/types.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "io" "time" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/watch" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "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/dao/cluster.go
internal/dao/cluster.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "log/slog" "sync" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/slogs" ) // RefScanner represents a resource reference scanner. ty...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/crd.go
internal/dao/crd.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao var ( _ Accessor = (*CustomResourceDefinition)(nil) _ Nuker = (*CustomResourceDefinition)(nil) ) // CustomResourceDefinition represents a CRD resource model. type CustomResourceDefinition struct { Resource }
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/benchmark.go
internal/dao/benchmark.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "os" "path/filepath" "regexp" "strings" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/render" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "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/dao/pod.go
internal/dao/pod.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "bufio" "context" "errors" "fmt" "io" "log/slog" "sync" "time" "github.com/cenkalti/backoff/v4" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/container_test.go
internal/dao/container_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "context" "testing" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" "github.com/derailed/k9s/internal/watch" "github.com/stretchr/testify/assert" "g...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/dp.go
internal/dao/dp.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "log/slog" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/slogs" appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" metav1...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/helm_history.go
internal/dao/helm_history.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "strconv" "strings" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/config/data" "github.com/derailed/k9s/internal/render/helm" "helm.sh/helm...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/screen_dump.go
internal/dao/screen_dump.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "os" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/render" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ) var ( _ Accessor = (*ScreenDump)(nil)...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/ds.go
internal/dao/ds.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "log/slog" "strings" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/slogs" "github.com/d...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/rest_mapper.go
internal/dao/rest_mapper.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "fmt" "strings" "github.com/derailed/k9s/internal/client" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/restmapper" ) // RestMapping holds k8s resource mapping. var RestMappi...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/helpers_test.go
internal/dao/helpers_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "testing" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" ) func TestToPerc(t *testing.T) { uu := []struct { v1, v2, e float64 }{ {0, 0, 0}, {100, 200, 50}, {200, 100, 200}, } for _, u := range uu { ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/rbac_policy.go
internal/dao/rbac_policy.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "log/slog" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/slogs" rbacv1 "k8s.io/api/rbac/v1" "k8s....
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/port_forward.go
internal/dao/port_forward.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "log/slog" "regexp" "strings" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/render" "github.com/...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/ns.go
internal/dao/ns.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao var _ Accessor = (*Namespace)(nil) // Namespace represents a namespace resource. type Namespace struct { Resource }
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/utils_test.go
internal/dao/utils_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "encoding/json" "fmt" "os" "path" "strings" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" "github.com/derailed/k9s/internal/watch" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructure...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/port_forward_test.go
internal/dao/port_forward_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "testing" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/dao" "github.com/stretchr/testify/assert" ) func TestBenchForConfig(t *testing.T) { uu := map[string]struct { file, key string s...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/alias_test.go
internal/dao/alias_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "context" "testing" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/dao" "github.com/derailed/k9s/internal/rende...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/svc.go
internal/dao/svc.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "github.com/derailed/k9s/internal/client" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" ) var ( _...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/recorder.go
internal/dao/recorder.go
package dao import ( "context" "errors" "fmt" "log/slog" "sync" "time" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/slogs" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" "k8s.io...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/secret.go
internal/dao/secret.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "bytes" "context" "fmt" "log/slog" "strings" "github.com/derailed/k9s/internal/slogs" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/cli-runtime/pkg...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/log_item_test.go
internal/dao/log_item_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "bytes" "fmt" "testing" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" "github.com/derailed/tview" "github.com/stretchr/testify/assert" ) func TestLogItemEmpty(t *testing.T) { uu :=...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/img_scan.go
internal/dao/img_scan.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/vul" "k8s.io/apimachinery/pkg/runtime" ) var _ Acces...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/resource.go
internal/dao/resource.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "github.com/derailed/k9s/internal" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" ) var ( _ Accessor = (*Resource)(nil) _ Describer = (*Resource)(nil) _ Nuker = (*Resource)(nil) )...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/cruiser_test.go
internal/dao/cruiser_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "encoding/json" "fmt" "os" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) func TestCruiserMeta(t *testing.T) { o := loadJSON(t, ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/benchmark_test.go
internal/dao/benchmark_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "context" "testing" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" "github.com/derailed/k9s/internal/render" "github.com/stretchr/testify/assert" "...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/port_forwarder.go
internal/dao/port_forwarder.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "fmt" "net/http" "net/url" "strings" "time" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/port" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pk...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/cruiser.go
internal/dao/cruiser.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "fmt" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" ) func mustMap(o runtime.Object, field string) map[string]any { u, ok := o.(*unstructured.Unstructured) if !ok { panic("no unstru...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/context.go
internal/dao/context.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "log/slog" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/slogs" "k8s.io/apimachinery/pkg/runtime" ) var ( _ Accessor = (*Context)(nil) _...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/dynamic.go
internal/dao/dynamic.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "strings" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "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/dao/helm_chart.go
internal/dao/helm_chart.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "log/slog" "os" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/config/data" "github.com/derailed/k9s/internal/render/helm" "github.com/derailed/k9s/internal/slogs" "helm.sh/he...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/accessor.go
internal/dao/accessor.go
package dao import ( "log/slog" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/slogs" ) var accessors = Accessors{ client.WkGVR: new(Workload), client.CtGVR: new(Context), client.CoGVR: new(Container), client.ScnGVR: new(ImageScan), client.SdGVR: new(ScreenDump), client.BeGV...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/log_items_test.go
internal/dao/log_items_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "fmt" "log/slog" "testing" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" "github.com/stretchr/testify/assert" ) func init() { slog.SetDefault(slog.New(slog.DiscardHandler)) } func ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/secret_test.go
internal/dao/secret_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao_test import ( "testing" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestEncodedSecretDescribe(t *testing.T) { va...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/log_item.go
internal/dao/log_item.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "bytes" ) // LogChan represents a channel for logs. type LogChan chan *LogItem var ItemEOF = new(LogItem) // LogItem represents a container log line. type LogItem struct { Pod, Container string SingleContainer bool Bytes ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/pulse.go
internal/dao/pulse.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "fmt" "k8s.io/apimachinery/pkg/runtime" ) // Pulse tracks pulses. type Pulse struct { NonResource } // List lists out pulses. func (*Pulse) List(context.Context, string) ([]runtime.Object, error) { return nil, fm...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/rbac_subject.go
internal/dao/rbac_subject.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/render" "k8s.io/apimachinery/pkg/runtime" ) var ( _ Accessor = (*Subject)(nil) _ Nuker = (*Subject)(nil) ) // Subject represents ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/patch.go
internal/dao/patch.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "encoding/json" ) // ImageSpec represents a container image. type ImageSpec struct { Index int Name, DockerImage string Init bool } // ImageSpecs represents a collection of container images. type Ima...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/sts.go
internal/dao/sts.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "log/slog" "strings" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/slogs" appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/registry_test.go
internal/dao/registry_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "errors" "testing" "github.com/derailed/k9s/internal/client" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestMetaFor(t *testing.T) { uu :...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/rbac_policy_test.go
internal/dao/rbac_policy_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "testing" "github.com/stretchr/testify/assert" rbacv1 "k8s.io/api/rbac/v1" ) func TestIsSameSubject(t *testing.T) { uu := map[string]struct { kind string namespace string name string subject rbacv1.Subjec...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/cronjob.go
internal/dao/cronjob.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "log/slog" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/slogs" batchv1 "k8s.io/api/batch/v1" metav1 "k8s.io/apimachinery/p...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/helpers.go
internal/dao/helpers.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "bytes" "errors" "fmt" "log/slog" "math" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/slogs" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "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/dao/rs.go
internal/dao/rs.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "fmt" "strconv" "strings" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" 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/dao/dir.go
internal/dao/dir.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "os" "path/filepath" "regexp" "strings" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "k8s.io/apimachinery/pkg/runtime" ) var ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/reference.go
internal/dao/reference.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "errors" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "k8s.io/apimachinery/pkg/runtime" ) var _ Accessor = (*Reference)(nil) // Reference...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/log_options.go
internal/dao/log_options.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "fmt" "time" "github.com/derailed/k9s/internal/client" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // LogOptions represents logger options. type LogOptions struct { CreateDuration time.Duratio...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/scalable.go
internal/dao/scalable.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao import ( "context" "log/slog" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/slogs" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/dynamic" "k8s.io/client-go/restmapper" "k8s.io/client...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/dao/cm.go
internal/dao/cm.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dao var _ Accessor = (*ConfigMap)(nil) // ConfigMap represents a configmap resource. type ConfigMap struct { Resource }
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/vul/scorer_test.go
internal/vul/scorer_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package vul import ( "testing" "github.com/stretchr/testify/assert" ) func Test_scorerAdd(t *testing.T) { uu := map[string]struct { b, b1, e scorer }{ "zero": {}, "same": { b: scorer(0x80), b1: scorer(0x80), e: scorer(0x80), }...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/vul/table_test.go
internal/vul/table_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package vul import ( "bufio" "os" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func Test_sort(t *testing.T) { uu := map[string]struct { t1, t2 *table }{ "simple": { t1: makeTable(t, ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/vul/table.go
internal/vul/table.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package vul import ( "fmt" "io" "sort" "strings" "github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter/renderer" "github.com/olekukonko/tablewriter/tw" ) const ( nameIdx = iota verIdx fixIdx typeIdx vulIdx sevIdx ) typ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/vul/types.go
internal/vul/types.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package vul const ( // Sev1 tracks Critical sev. Sev1 = "SEV-1" // Sev2 tracks High sev. Sev2 = "SEV-2" // Sev3 tracks Medium sev. Sev3 = "SEV-3" // Sev4 tracks Low sev. Sev4 = "SEV-4" // Sev5 tracks Negligible sev. Sev5 = "SEV-5" // S...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/vul/scan.go
internal/vul/scan.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package vul import ( "fmt" "io" "strings" "github.com/anchore/grype/grype/match" "github.com/anchore/grype/grype/vulnerability" ) const ( wontFix = "(won't fix)" naValue = "" ) // Scans tracks scans per image. type Scans map[string]*Scan //...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/vul/tally_test.go
internal/vul/tally_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package vul import ( "testing" "github.com/stretchr/testify/assert" ) func Test_newTally(t *testing.T) { uu := map[string]struct { t *table tt tally }{ "full": { t: makeTable(t, "testdata/sort/full/sc2.text"), tt: tally{7, 14, 8, 0...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/vul/scorer.go
internal/vul/scorer.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package vul import "fmt" type scorer uint8 func (b scorer) String() string { return fmt.Sprintf("%08b", b)[:6] } func newScorer(t tally) scorer { return fromTally(t) } func (b scorer) Add(b1 scorer) scorer { return b | b1 } func fromTally(t ta...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/vul/scanner.go
internal/vul/scanner.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package vul import ( "context" "errors" "fmt" "log/slog" "sync" "time" "github.com/anchore/clio" "github.com/anchore/grype/cmd/grype/cli/options" "github.com/anchore/grype/grype" "github.com/anchore/grype/grype/match" "github.com/anchore/g...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/vul/tally.go
internal/vul/tally.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package vul import ( "fmt" "io" ) const ( sevCritical = iota sevHigh sevMedium sevLow sevNegligible sevUnknown sevFixed ) var vulWeights = []int{10_000, 100, 100, 10, 0, 0, 0, 0} type tally [7]int func newTally(t *table) tally { var tt t...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/health/types.go
internal/health/types.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package health // Level tracks health count categories. type Level int const ( // Unknown represents no health level. Unknown Level = 1 << iota // Corpus tracks total health. Corpus // S1 tracks series 1. S1 // S2 tracks series 2. S2 // ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/health/check.go
internal/health/check.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package health import ( "github.com/derailed/k9s/internal/client" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // Check tracks resource health. type Check struct { Counts GVR *client.GVR } // Checks represents a...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/health/check_test.go
internal/health/check_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package health_test import ( "testing" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/health" "github.com/stretchr/testify/assert" ) func TestCheck(t *testing.T) { var cc health.Checks c := health.NewCheck(client....
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/port/co_portspec.go
internal/port/co_portspec.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port import ( "strconv" "strings" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" ) // ContainerPortSpecs represents a container exposed ports. type ContainerPortSpecs []ContainerPortSpec func (c ContainerPortSpecs) Dump()...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/port/pfs_test.go
internal/port/pfs_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port_test import ( "context" "errors" "testing" "github.com/derailed/k9s/internal/port" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/util/intstr" ) func TestParsePFs(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/port/pf_test.go
internal/port/pf_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port_test import ( "errors" "testing" "github.com/derailed/k9s/internal/port" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/util/intstr" ) func TestParsePF(t *testing.T) { uu := ma...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/port/ann.go
internal/port/ann.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port import ( "errors" ) type Annotations map[string]string func (a Annotations) PreferredPorts(specs ContainerPortSpecs) (PFAnns, error) { if len(specs) == 0 { return nil, errors.New("no exposed ports") } value, ok := a[K9sPortForwar...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/port/pfs.go
internal/port/pfs.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port import ( "context" "fmt" "strings" ) // PortCheck checks if port is free on host. type PortChecker func(context.Context, PortTunnel) bool // PFAnns represents a collection of port forward annotations. type PFAnns []*PFAnn // ToPortS...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/port/pf.go
internal/port/pf.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port import ( "errors" "fmt" "regexp" "strings" "k8s.io/apimachinery/pkg/util/intstr" ) const ( // K9sAutoPortForwardsKey represents an auto portforwards annotation. K9sAutoPortForwardsKey = "k9scli.io/auto-port-forwards" // K9sPort...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/port/tunnel.go
internal/port/tunnel.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port import ( "context" "fmt" "log/slog" "net" "github.com/derailed/k9s/internal/slogs" ) // PortTunnels represents a collection of tunnels. type PortTunnels []PortTunnel // CheckAvailable checks if all port tunnels are available. func...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/port/tunnel_test.go
internal/port/tunnel_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port_test import ( "testing" "github.com/derailed/k9s/internal/port" "github.com/stretchr/testify/assert" ) func TestPortTunnelMap(t *testing.T) { uu := map[string]struct { pt port.PortTunnel coPort, locPort string e ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/port/co_portspec_test.go
internal/port/co_portspec_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port_test import ( "testing" "github.com/derailed/k9s/internal/port" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestContainerPortSpecMatch(t *testing.T) { uu := map[string]struct { ann string ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/port/ann_test.go
internal/port/ann_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package port_test import ( "errors" "testing" "github.com/derailed/k9s/internal/port" "github.com/stretchr/testify/assert" ) func TestPreferredPorts(t *testing.T) { uu := map[string]struct { anns port.Annotations specs port.ContainerPortSp...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model/text.go
internal/model/text.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model import ( "strings" "github.com/derailed/k9s/internal" "github.com/sahilm/fuzzy" ) // Filterable represents an entity that can be filtered. type Filterable interface { Filter(string) ClearFilter() } // Textable represents a text r...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model/history_test.go
internal/model/history_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model_test import ( "fmt" "testing" "github.com/derailed/k9s/internal/model" "github.com/stretchr/testify/assert" ) func TestHistoryClear(t *testing.T) { h := model.NewHistory(3) for i := 1; i < 5; i++ { h.Push(fmt.Sprintf("cmd%d", i...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model/rev_values.go
internal/model/rev_values.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model import ( "context" "errors" "log/slog" "strings" "sync/atomic" "time" backoff "github.com/cenkalti/backoff/v4" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao"...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model/tree.go
internal/model/tree.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model import ( "context" "fmt" "log/slog" "regexp" "strings" "sync/atomic" "time" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" "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/model/describe.go
internal/model/describe.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model import ( "context" "fmt" "log/slog" "reflect" "strings" "sync/atomic" "time" backoff "github.com/cenkalti/backoff/v4" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" "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/model/flash_test.go
internal/model/flash_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model_test import ( "errors" "fmt" "testing" "time" "github.com/derailed/k9s/internal/model" "github.com/stretchr/testify/assert" ) func TestFlash(t *testing.T) { const delay = 1 * time.Millisecond uu := map[string]struct { level ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model/menu_hint_test.go
internal/model/menu_hint_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model_test import ( "sort" "testing" "github.com/derailed/k9s/internal/model" "github.com/stretchr/testify/assert" ) func TestMenuHintsSort(t *testing.T) { uu := map[string]struct { hh model.MenuHints e []int }{ "mixed": { hh...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model/cmd_buff_test.go
internal/model/cmd_buff_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model_test import ( "testing" "github.com/derailed/k9s/internal/model" "github.com/stretchr/testify/assert" ) type testListener struct { text, suggestion string act int inact int } func (l *testListener) Buffer...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model/cluster_info_test.go
internal/model/cluster_info_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model_test import ( "log/slog" "testing" "github.com/derailed/k9s/internal/model" "github.com/stretchr/testify/assert" ) func init() { slog.SetDefault(slog.New(slog.DiscardHandler)) } func TestClusterMetaDelta(t *testing.T) { uu := ma...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/model/registry.go
internal/model/registry.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package model import ( "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/render/helm" "github.com/derailed/k9s/internal/xray" ) // Registr...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false