Skip to content

Instantly share code, notes, and snippets.

@sttts
Created April 9, 2024 17:43
Show Gist options
  • Save sttts/9629e094f7ee8a5c781dd9e2bb85a4f0 to your computer and use it in GitHub Desktop.
Save sttts/9629e094f7ee8a5c781dd9e2bb85a4f0 to your computer and use it in GitHub Desktop.
diff --git a/go.mod b/go.mod
index 099edb7..b44bad4 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,7 @@ require (
github.com/google/go-cmp v0.6.0
github.com/keegancsmith/shell v0.0.0-20160208231706-ccb53e0c7c5c
google.golang.org/protobuf v1.32.0
- gopkg.in/yaml.v2 v2.4.0
+ k8s.io/api v0.29.1
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.1
sigs.k8s.io/controller-tools v0.14.0
@@ -63,8 +63,8 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/grpc v1.61.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
- k8s.io/api v0.29.1 // indirect
k8s.io/apiextensions-apiserver v0.29.1 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
diff --git a/script.go b/script.go
index 68acac5..9e71dc3 100644
--- a/script.go
+++ b/script.go
@@ -13,10 +13,10 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth"
)
-func loadShellScripts(shellScriptsConfigMapsRef v1beta1.ShellScriptsConfigMapsRef) error {
+func loadShellScripts(shellScriptsConfigMapsRef v1beta1.ShellScriptsConfigMapRef) error {
shellScripts := make(map[string]string)
- for _, shellScriptsConfigMapRef := range v1beta1.ShellScriptsConfigMapsRef {
+ for _, shellScriptsConfigMapRef := range shellScriptsConfigMapsRef {
newShellScripts, err := getShellScriptsFromConfigMap(shellScriptsConfigMapRef)
if err != nil {
// TODO: log a warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment