consts

package
v0.0.0-...-8c00ab9 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// GOOSLinux linux 系统标识
	GOOSLinux = "linux"
	// GOOSMac mac 系统标识
	GOOSMac = "darwin"
	// GOOSAndroid android 系统标识
	GOOSAndroid = "android"
	// GOOSFreebsd freebsd 系统标识
	GOOSFreebsd = "freebsd"
	// GOOSOpenbsd openbsd 系统标识
	GOOSOpenbsd = "openbsd"
	// GOOSSolaris solaris 系统标识
	GOOSSolaris = "solaris"
	// GOOSWindows windows 系统标识
	GOOSWindows = "windows"
)

linux操作系统

View Source
const (

	// DBTypeMysql 数据库类型
	DBTypeMysql = "mysql"

	// DBTypePostgresql 数据库类型
	DBTypePostgresql = "postgresql"
)
View Source
const (

	// EvnSocRunName 环境变量名
	EvnSocRunName = "SOC_RUN_ENV"

	// EnvLocal 本地环境
	EnvLocal = "local"
	// EnvDev 开发环境
	EnvDev = "dev"
	// EnvUnitTest 单元测试环境
	EnvUnitTest = "utest"
	// EnvTest 测试环境
	EnvTest = "test"
	// EnvStag 预发布环境
	EnvStag = "stag"
	// EnvProd 生产环境
	EnvProd = "prod"
)
View Source
const (

	// ContextTracerKey traceId 的 context key
	ContextTracerKey = "soc_trace_id"

	// ContextParentSpanKey parent span 的 context key
	ContextParentSpanKey = "soc_parent_span"
)
View Source
const (
	LineSep = "\n"

	// EmptyStr 空字符串
	EmptyStr = ""
)

LineSep 换行符

View Source
const AppDateFormat = "2006-01-02"
View Source
const AppDateFormat2 = "20060102"
View Source
const AppMonthFormat = "200601"
View Source
const AppSystemTimeFormat = "2006-01-02T15:04:05Z0700"
View Source
const AppSystemTimeFormat8 = "2006-01-02T15:04:05.999Z0700"
View Source
const AppTimeFormat = "2006-01-02 15:04:05"
View Source
const AppTimeFormat2 = "20060102150405"
View Source
const AppTimeFormatMillisecond = "2006-01-02 15:04:05.999"
View Source
const BlankDate = "1970-01-01"
View Source
const BlankString = ""

BlankString 默认空字符串

View Source
const BlankTime = "1970-01-01 00:00:00"

Variables

View Source
var BlankTimeObject, _ = time.Parse(AppTimeFormat, BlankTime)

Functions

func GetCurrentEnv

func GetCurrentEnv() string

GetCurrentEnv 获取当前环境值

Types

This section is empty.

Jump to

Keyboard shortcuts

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