config

package
v0.0.0-...-db8959b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(file string, c *Config) error

Load 加载配置

func Unmarshal

func Unmarshal(c *Config) error

Types

type Config

type Config struct {
	Server   Server       `mapstructure:"server"`
	Database db.Config    `mapstructure:"database"`
	Log      zap.Config   `mapstructure:"log"`
	Redis    redis.Config `mapstructure:"redis"`
}

Config 配置信息

type Server

type Server struct {
	Addr string `mapstructure:"addr"`
}

Jump to

Keyboard shortcuts

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