1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-08-09 07:42:52 +03:00

cspell lint go code (#3706)

This commit is contained in:
6543
2024-05-24 22:35:04 +02:00
committed by GitHub
parent 4628a97c93
commit 42f2734308
44 changed files with 214 additions and 161 deletions

View File

@@ -23,7 +23,7 @@ import (
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
client_cmd "k8s.io/client-go/tools/clientcmd"
)
var (
@@ -65,15 +65,15 @@ func isImagePullBackOffState(pod *v1.Pod) bool {
return false
}
// getClientOutOfCluster returns a k8s clientset to the request from outside of cluster.
// getClientOutOfCluster returns a k8s client set to the request from outside of cluster.
func getClientOutOfCluster() (kubernetes.Interface, error) {
kubeConfigPath := os.Getenv("KUBECONFIG")
kubeConfigPath := os.Getenv("KUBECONFIG") // cspell:words KUBECONFIG
if kubeConfigPath == "" {
kubeConfigPath = os.Getenv("HOME") + "/.kube/config"
}
// use the current context in kubeconfig
config, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath)
// use the current context in kube config
config, err := client_cmd.BuildConfigFromFlags("", kubeConfigPath)
if err != nil {
return nil, err
}
@@ -81,7 +81,7 @@ func getClientOutOfCluster() (kubernetes.Interface, error) {
return kubernetes.NewForConfig(config)
}
// getClient returns a k8s clientset to the request from inside of cluster.
// getClient returns a k8s client set to the request from inside of cluster.
func getClientInsideOfCluster() (kubernetes.Interface, error) {
config, err := rest.InClusterConfig()
if err != nil {