hsys

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: Apache-2.0 Imports: 7 Imported by: 13

Documentation

Index

Constants

View Source
const SysRunModeCfg = "sys.run.mode"

Variables

View Source
var ColorWriter = &colorWriter{}
View Source
var NoneWriter = &noneWriter{}

Functions

func ConsoleToLogger

func ConsoleToLogger(call func(msg string))

func Error

func Error(arg ...any)

func Exit

func Exit(err error)

func Info

func Info(arg ...any)

func ServerID

func ServerID() string

func Success

func Success(arg ...any)

func Warn

func Warn(arg ...any)

func WorkingDirectory

func WorkingDirectory() string

Types

type Mode

type Mode uint8

Mode Run Mode Defined

const (
	LOCAL   Mode = 1
	DEV     Mode = 2
	TEST    Mode = 3
	PRE     Mode = 4
	PROD    Mode = 5
	UNKNOWN Mode = 0
)

func ModeOf

func ModeOf(modeVal string) Mode

func RunMode

func RunMode() Mode

func (Mode) IsDev

func (m Mode) IsDev() bool

func (Mode) IsLocal

func (m Mode) IsLocal() bool

func (Mode) IsPre

func (m Mode) IsPre() bool

func (Mode) IsProd

func (m Mode) IsProd() bool

func (Mode) IsRd

func (m Mode) IsRd() bool

func (Mode) IsTest

func (m Mode) IsTest() bool

func (Mode) String

func (m Mode) String() string

Jump to

Keyboard shortcuts

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