util

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TextBlack = iota + 30
	TextRed
	TextGreen
	TextYellow
	TextBlue
	TextMagenta
	TextCyan
	TextWhite
)

Variables

This section is empty.

Functions

func AssemblyDir

func AssemblyDir() string

func AssemblyFile

func AssemblyFile() string

func Black

func Black(msg string) string

func Blue

func Blue(msg string) string

func Cyan

func Cyan(msg string) string

func FileExist

func FileExist(addr string) bool

func GetTimeOfDay added in v1.0.1

func GetTimeOfDay(t time.Time) time.Time

Get the time of the current day at zero hour

func GetUnixOfDay added in v1.0.1

func GetUnixOfDay(t time.Time) int64

Get the Unix timestamp of the current day at zero hour

func Green

func Green(msg string) string

func Indirect added in v1.0.4

func Indirect(v reflect.Value) reflect.Value

func Magenta

func Magenta(msg string) string

func MkDirIfNotExist

func MkDirIfNotExist(path string) error

如果目录不存在则创建目录, 如果存在则赋予0777权限

func ParseMapPointer added in v1.0.2

func ParseMapPointer(key_map interface{}) (*reflect.Value, *reflect.Type, *reflect.Kind, *reflect.Type, *reflect.Type, error)

parse map interface typed returm [map_pointer,map_type,map_keytype,slice_type,element_type,error]

func ParseSlicePointer added in v1.0.2

func ParseSlicePointer(list interface{}, clearList bool) (*reflect.Value, *reflect.Value, *reflect.Type, error)

parse slice interface typed returm [slice_pointer,origin_slice,element_type,error]

func Red

func Red(msg string) string

func SetColor

func SetColor(msg string, conf, bg, text int) string

func White

func White(msg string) string

func Yellow

func Yellow(msg string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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