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

Question: Looping through the sections #1

Open
goharahmed opened this issue Oct 4, 2016 · 0 comments
Open

Question: Looping through the sections #1

goharahmed opened this issue Oct 4, 2016 · 0 comments

Comments

@goharahmed
Copy link

Hi,
Its a really great tutorial and got me going on this very nicely. I have a quick question. How do I tell go lang to loop through the sections in the config.toml file. For example,

[development1]
server = 1.1.1.1
port = 111
type = development

[development2]
server = 1.2.2.2
port = 222
type = development

[blahblah]
server = 9.9.9.9
port = 1010
type = production

so, the user might declare multiple instance in the config, how do I continue reading these sections in a loop and based on "type" I can add them in the array , say, Development_Servers.

Thanks.

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

No branches or pull requests

1 participant