Golang 多种配置文件解析
Golang 配置文件相关操作
本文以读取数据库配置文件为例
1、JSON 文件
package main
/*
解析 json 格式的配置文件
文件内容如下:
{
"type": "json",
"postgres": {
"host": "localhost",
"port": 5432,
"username": "postgres",
"password": "postgres",
"dbname": "bub...
原创
2022-01-21 12:36:32 ·
1609 阅读 ·
0 评论