func LoadDefaultConfig(application *vars.Application) error {
	flag.Parse()
	var err error
	var confFile = ConfFileName
	if *flagConf != "" {
		confFile = *flagConf
	}
	cfg, err = ini.Load(confFile)
	if err != nil {
		return err
	}
	for _, sectionName := range cfg.SectionStrings() {
		if sectionName == SectionServer {
			vars.ServerSetting = new(setting.ServerSettingS)
			MapConfig(sectionName, vars.ServerSetting)
			continue
		}
		if sectionName == SectionRateLimit {
			vars.RateLimitSetting = new(setting.RateLimitSettingS)
			MapConfig(sectionName, vars.RateLimitSetting)
			continue
		}
		if sectionName == SectionLogger {
			vars.LoggerSetting = new(setting.LoggerSettingS)
			MapConfig(sectionName, vars.LoggerSetting)
			continue
		}
		if sectionName == SectionJwt {
			vars.JwtSetting = new(setting.JwtSettingS)
			MapConfig(sectionName, vars.JwtSetting)
			continue
		}
	}
	return nil
}
LoadDefaultConfig loads config form cfg.
package config
import (
	"flag"
	"gitee.com/cristiane/micro-mall-api/config/setting"
	"gitee.com/cristiane/micro-mall-api/vars"
	"log"
	"github.com/go-ini/ini"
)
const (
	ConfFileName = "./etc/app.ini"
	SectionServer = "web-server"
	SectionLogger = "web-logger"
	SectionJwt = "web-jwt"
	SectionRateLimit = "web-rate-limit"
	SectionMysql = "web-mysql"
	SectionRedis = "web-redis"
)
var (
	cfg      *ini.File
	flagConf = flag.String("web_conf_file", "", "Set app config.")
)