utils

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextIsDone

func ContextIsDone(ctx context.Context) error

ContextIsDone 判断上下文(Context)是否已经结束,完成

func EQ added in v2.1.1

func EQ(left, right interface{}) bool

EQ 等于

func GT added in v2.1.1

func GT(left, right interface{}) bool

GT 大于

func GTE added in v2.1.1

func GTE(left, right interface{}) bool

GTE 大于等于

func GetLocalIPv4

func GetLocalIPv4() string

GetLocalIPv4 获取当前IPv4地址

func GetMasterIP

func GetMasterIP() string

GetMasterIP 获取连接互联网的主IP地址

func Hostname

func Hostname() string

*

@author : Jerbe - The porter from Earth
@time : 2023/9/19 21:40
@describe :

Hostname 获取主机名

func IsNil

func IsNil(v interface{}) bool

IsNil 检测是否是真nil值

func LT added in v2.1.1

func LT(left, right interface{}) bool

LT 小于

func LTE added in v2.1.1

func LTE(left, right interface{}) bool

LTE 小于等于

Types

type CompareFunc added in v2.1.2

type CompareFunc func(left, right interface{}) bool

type Signal added in v2.1.1

type Signal struct {
	// contains filtered or unexported fields
}

func NewSignal added in v2.1.1

func NewSignal() *Signal

func (*Signal) Close added in v2.1.1

func (s *Signal) Close()

func (*Signal) Publish added in v2.1.1

func (s *Signal) Publish(i int)

func (*Signal) Subscribe added in v2.1.1

func (s *Signal) Subscribe() <-chan int

Jump to

Keyboard shortcuts

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