config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT 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 {
	Prefix         string `mapstructure:"PREFIX"`
	DiscordToken   string `mapstructure:"DISCORD_TOKEN"`
	Endpoint       string `mapstructure:"ENDPOINT"`
	PunchApiPath   string `mapstructure:"PUNCH_API_PATH"`
	LoginApiPath   string `mapstructure:"LOGIN_API_PATH"`
	SendingChannel string `mapstructure:"SENDING_CHANNEL"`
}

func GetEnv

func GetEnv() *Config

func New

func New() *Config

New init env, this function will load .env file at first if exist it will load environment variable APP_ENV is required, if not set, it will panic .env file is for local development, environment variable is for production

Jump to

Keyboard shortcuts

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