config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load() (err error)

Load 加载配置

func Try2InitFile added in v1.1.0

func Try2InitFile(defaultConfig []byte) (filename string, err error)

Try2InitFile 初始化配置文件

Types

type Config

type Config struct {
	Addr     string `json:"addr"`
	DB       string `json:"db"`
	UserName string `json:"username"`
	Password string `json:"password"`
}

Config 配置

var C Config

C 全局配置

Jump to

Keyboard shortcuts

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