config

package
v0.0.0-...-f4a4805 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Env   Env
	Mysql Mysql `yaml:"Mysql"`
}

func Get

func Get() Config

Get 返回副本,以确保Config不被外部逻辑更改

type Env

type Env struct {
	RunMode string // dev、prod
	Port    string
}

type Mysql

type Mysql struct {
	ReadDSN  string `yaml:"ReadDSN"`
	WriteDSN string `yaml:"WriteDSN"`
}

Jump to

Keyboard shortcuts

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