z

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Debug   = Mode("debug")
	Test    = Mode("test")
	Release = Mode("release")
)

Variables

This section is empty.

Functions

func DebugMode

func DebugMode() bool

func DumpStack added in v0.3.12

func DumpStack(depth, skip int) string

func Must

func Must(err error, args ...any)

Abort: main.main

  • Location:/root/github/go-tools/xlog/example/log.go:34 +0x48e649
  • Detail: xxx 123

func Mustf

func Mustf(err error, format string, args ...any)

func ReleaseMode

func ReleaseMode() bool

func SetMode

func SetMode(m Mode)

func TestMode

func TestMode() bool

func TryGet added in v0.3.15

func TryGet[T chan E, E any](c T) (E, bool)

func TryPut added in v0.3.15

func TryPut[T chan E, E any](c T, e E) bool

func WithLock added in v0.3.12

func WithLock(locker Locker, f func())

func WithRLock added in v0.3.12

func WithRLock(locker RWLocker, f func())

Types

type Locker added in v0.3.12

type Locker sync.Locker

type Mode

type Mode string

type RWLocker added in v0.3.12

type RWLocker interface {
	RLock()
	RUnlock()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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