app

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitEnv

func InitEnv()

InitEnv 初始化环境变量

Types

type AppConfig

type AppConfig struct {
	Release bool
	Http    struct {
		Addr string `env:"HTTP_ADDR"`
	}
	Mysql struct {
		Addr   string `env:"MYSQL_ADDR"`
		User   string `env:"MYSQL_USER"`
		Pwd    string `env:"MYSQL_PWD"`
		DbName string `env:"MYSQL_DB_NAME"`
	}
	Mqtt struct {
		Addr string `env:"MQTT_ADDR"`
		User string `env:"MQTT_USER"`
		Pwd  string `env:"MQTT_PWD"`
	}
}

func Get

func Get() *AppConfig

Get 获取环境变量

Jump to

Keyboard shortcuts

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