Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [CI-10165]: support additional kaniko args from PLUGIN_ env vars… #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

smjt-h
Copy link
Collaborator

@smjt-h smjt-h commented Jan 31, 2024

… with FF

kaniko.go Outdated Show resolved Hide resolved
kaniko.go Show resolved Hide resolved
kaniko.go Show resolved Hide resolved
kaniko.go Show resolved Hide resolved
envVars := os.Environ()

// Iterate through environment variables
for _, envVar := range envVars {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer smaller if statements and continuing early. Eg-

for _, envVar := range envVars {
  if !valid(envVar) {
     continue
  }
  // rest of the logic here
}

as opposed to

for _, envVar := range envVars {
  if valid(envVar) {
     // bunch of logic here
  }
}

as it makes the code easier to read if there are smaller statements inside the if

kaniko.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants