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

Document function declaration #2849

Open
janrito opened this issue Apr 30, 2024 · 0 comments
Open

Document function declaration #2849

janrito opened this issue Apr 30, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@janrito
Copy link

janrito commented Apr 30, 2024

Trying to declare a couple of helper functions. But at the moment, it is a bit of a trial and error process because of the lack of documentation. I have questions such as:

  • How do I declare parameters?
  • How do I return values? echo? exit?
  • How do I print to stdout/stderr from a function?

AS an example, I'm trying to create a function that tests whether I am in a local "minikube" or CI environment before running a specialised testing pipeline. I want to abstract that test to a function, because I have a couple of such testing pipelines. I want the function to print an error, and then stop the pipeline early. Can I exit from inside a function, or do I have to return a value and test for it in the pipeline to exit.

@janrito janrito added the kind/bug Something isn't working label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant