From afe84e5bd5e6c63e8f1eac5f6328e57ddbaa9f58 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 26 Aug 2020 11:23:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/conf.go | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/conf/conf.go b/conf/conf.go index b668bd3..7f834c4 100644 --- a/conf/conf.go +++ b/conf/conf.go @@ -7,11 +7,10 @@ import ( "os" ) -type _database struct { - Desc string `yaml:"desc"` - Type string `yaml:"type"` - Url string `yaml:"url"` - ShowSQL bool `yaml:"showSQL"` +type _storage struct { + Desc string `yaml:"desc"` + Path string `yaml:"path"` + Debug bool `yaml:"debug"` } type _http struct { @@ -22,19 +21,18 @@ type _http struct { } type _config struct { - Database _database `yaml:"database"` - Http _http `yaml:"http"` + Storage _storage `yaml:"storage"` + Http _http `yaml:"http"` } var Config = _config{ - _database{ + _storage{ "数据库配置", - "mysql", - "root:root@tcp(127.0.0.1:3306)/dtu?charset=utf8", + ".", false, }, _http{ - "HTTP服务配置,API接口", + "HTTP服务配置", ":8080", false, false, -- GitLab