config

package
v0.0.0-...-1db98da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(filename string)

Types

type Config

type Config struct {
	Env     string `yaml:"Env"`     // 环境:prod、dev
	BaseUrl string `yaml:"BaseUrl"` // base url
	Port    string `yaml:"Port"`    // 端口
	LogFile string `yaml:"LogFile"` // 日志文件

	MySqlUrl     string `yaml:"MySqlUrl"` // 数据库连接地址
	MaxIdleConns int    `yaml:"MaxIdleConns"`
	MaxOpenConns int    `yaml:"MaxOpenConns"`
	ShowSql      bool   `yaml:"ShowSql"` // 是否显示日志
}
var Conf *Config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL