Go Cheatsheet - Read Config File
Read Config File
Json
If your config file only contains a few of fields, and you don't want to install external modules, the easiest way is just using the json file.
Suppose we have a config file like below:
{
"host": "127.0.0.1",
"port": 808...
hn.0xbf.me2 min read