config

package
v0.0.0-...-be1cf1d Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fdb = flag.String("db", "", "指定数据库")
View Source
var Ftb = flag.String("tb", "", "指定数据表")

Functions

func InitConfig

func InitConfig(path string)

initConfig 初始化读取配置文件,传递到全局变量Conf中

Types

type Config

type Config struct {
	DB struct {
		Address     string `yaml:"address"`
		Port        int    `yaml:"port"`
		User        string `yaml:"user"`
		Password    string `yaml:"password"`
		DBName      string `yaml:"db_name"`
		MaxIdleConn int    `yaml:"max_idle_conn"`
		MaxOpenConn int    `yaml:"max_open_conn"`
	} `yaml:"db"`
}
var Conf *Config

Jump to

Keyboard shortcuts

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