common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorPrint

func ColorPrint(s string, i int)

输出有颜色的字体

func IsEmpty

func IsEmpty(value ...interface{}) bool

func NewDebounce

func NewDebounce(delay time.Duration) *debounce

delay 毫秒

func PathConcat

func PathConcat(paths ...string) string

"1path","/2path","3path/","/4path/"

func PathExists

func PathExists(path string) bool

func RandomString

func RandomString(n int, allowedChars ...[]rune) string

RandomString returns a random string with a fixed length

func TestColor

func TestColor()

func ToJson

func ToJson(data interface{}) ([]byte, error)

Types

type Color

type Color struct {
	Red          int // 红色
	Purple       int // 紫色
	Yellow       int // 黄色
	Light_gray   int // 淡灰色(系统默认值)
	Gray         int // 灰色
	Light_blue   int // 亮蓝色
	Light_green  int // 亮绿色
	Light_cyan   int // 亮青色
	Light_red    int // 亮红色
	Light_purple int // 亮紫色
	Light_yellow int // 亮黄色
	White        int // 白色
	// contains filtered or unexported fields
}
var (
	// 给字体颜色对象赋值
	FontColor Color = Color{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
)

type Queue

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

func NewQueue

func NewQueue() *Queue

func (*Queue) Clear

func (m *Queue) Clear()

func (*Queue) Len

func (m *Queue) Len() int

func (*Queue) Pop

func (m *Queue) Pop() (interface{}, error)

func (*Queue) Push

func (m *Queue) Push(data interface{})

Jump to

Keyboard shortcuts

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