env

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NETEASE_EMAIL    = os.Getenv("NETEASE_EMAIL")
	NETEASE_PASSWORD = os.Getenv("NETEASE_PASSWORD")
)
View Source
var (
	LarkAppID     = os.Getenv("LARK_CLIENT_ID")
	LarkAppSecret = os.Getenv("LARK_SECRET")
)
View Source
var CheckPeriod = GetEnvWithDefault("CHECK_PERIOD", "5")

CheckPeriod 1

View Source
var GitCommitMessage = GetEnvWithDefault("GIT_COMMIT_MESSAGE", "")

GitCommitMessage 1

View Source
var GithubSha = GetEnvWithDefault("GITHUB_SHA", "")

GithubSha 1

View Source
var MusicCardInThread = GetEnvWithDefaultGenerics("MUSIC_CARD_IN_THREAD", false, func(s string) bool {
	if s == "true" {
		return true
	}
	return false
})
View Source
var OSS_EXPIRATION_TIME time.Duration

Functions

func GetEnvWithDefault

func GetEnvWithDefault(s, d string) (r string)

GetEnvWithDefault 带默认值的获取方法

@param s
@param d
@return r

func GetEnvWithDefaultGenerics

func GetEnvWithDefaultGenerics[T any](key string, defaultValue T, parseFunc func(string) T) (r T)

GetEnvWithDefaultGenerics 带默认值的获取方法

@param s string
@param d string
@return r string
@author heyuhengmatt
@update 2024-08-12 03:21:17

Types

This section is empty.

Jump to

Keyboard shortcuts

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