Skip to content

Commit

Permalink
chore: make namespace required in GetEnvValueFromCache
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed May 8, 2024
1 parent a8437ed commit 8e372ae
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,8 @@ func (k Context) GetAnnotations() map[string]string {
return k.GetObjectMeta().Annotations
}

func (k Context) GetEnvValueFromCache(input types.EnvVar, namespace ...string) (string, error) {
if len(namespace) == 0 {
namespace = []string{k.GetNamespace()}
}
return GetEnvValueFromCache(k, input, namespace[0])
func (k Context) GetEnvValueFromCache(input types.EnvVar, namespace string) (string, error) {
return GetEnvValueFromCache(k, input, namespace)
}

func (k Context) GetEnvStringFromCache(env string, namespace string) (string, error) {
Expand Down

0 comments on commit 8e372ae

Please sign in to comment.