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

config: Adjust loop function to allow ranges by strings/env vars #555

Merged
merged 1 commit into from
Apr 16, 2018

Conversation

jwreagor
Copy link
Contributor

This commit adjusts the implementation of the template config function called
loop. We make adjustments to allow for the loop function to take a string or
environment variable as input. We use a simple switch statement with a type
assertion and detect either a string or not. By default we continue using int
types as normal. Also tests have been adjusted to demonstrate the working
functionality.

Fixes #554

This commit adjusts the implementation of the template config function called
`loop`. We make adjustments to allow for the loop function to take a string or
environment variable as input. We use a simple switch statement with a type
assertion and detect either a string or not. By default we continue using `int`
types as normal. Also tests have been adjusted to demonstrate the working
functionality.

Fixes TritonDataCenter#554
@jwreagor jwreagor merged commit 1aa69d8 into TritonDataCenter:master Apr 16, 2018
@jwreagor jwreagor deleted the gh554_loop_str branch April 18, 2018 02:51
@jwreagor jwreagor mentioned this pull request Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant