DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: Let's write config for your Golang web app on right way β€” YAML πŸ‘Œ

Collapse
dadatuputi profile image
Bradford

Good article, thank you. I'm working on a personal project and using this opportunity to learn go. I followed your guide mostly, except I have two different configuration files. I wanted to avoid rewriting code, and I was able to abstract away the type of config struct from the YML parsing function using an interface{} as an additional parameter. It worked well for me, you can see it here. Thanks again.

Collapse
koddr profile image
Vic ShΓ³stak Author

Thanks for reply! πŸ˜‰ Yep, separated configs are very helpful.

Interesting project, btw! Keep going πŸ‘