Comments (3)
Json is already used for configuration files in many Go programs. Json is "simple" and "readable".
also to use Json no external dependencies required.
If it's not Json, then what is the alternative?
I suggest .ini file as an alternative
from dasarpemrogramangolang.
JSON is not recommended on the production stage, especially when application managed using orchestration via Kubernetes. Every configuration needs to be in an os environment variable or in the shared storage like ETCD for example.
It'll be hard to manage the app seamlessly in an automated manner when the config is stored in a file. Like for example, what if I want to scale the current container into several instances with different port and config? I need to rewrite the .ini or the .json file on-the-fly? No. definitely nope.
I'm not talking about the self-preference version. I'm talking about real-world implementation. even docker-compose used env var to manage the config
from dasarpemrogramangolang.
what I'm going to do probably improve the current JSON config chapter, explain the pros and cons (from DevOps perspective). and then create another one that uses OS env var. let's see.
from dasarpemrogramangolang.
Related Issues (20)
- golang naming convention HOT 5
- Typo pada file 14-array.md HOT 2
- typo
- cd pipeline is not working HOT 2
- New page: profiling using pprof and profile
- New page: goreleaser
- Typo pada laman slice
- E book
- New page: go workspace HOT 1
- New page: go clean arch
- Page load is too slow HOT 3
- automate tag & release creation
- New page: slog
- exclude embedded sections from ebook generation
- bug: navigation blocked by some button attribute on mobile devices and impact on all content. HOT 1
- bug: wrong Homebrew install command.
- refactor: Update minimum go version
- New section: error wrap
- refactor: writing improvement
- update page: randv2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dasarpemrogramangolang.