TritonDataCenter / containerpilot

A service for autodiscovery and configuration of applications running in containers
Mozilla Public License 2.0
1.12k stars 136 forks source link

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

Closed jwreagor closed 6 years ago

jwreagor commented 6 years ago

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