utils

package
v0.0.0-...-6a99ca7 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DAY = iota
	HOUR
	MINUTE
)
View Source
const (
	RandomStringModNumberPlusLetter = iota
	RandomStringModNumberPlusLetterPlusSymbol
	RandomStringModNumber
)

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key string, cipherText []byte) ([]byte, error)

func Encrypt

func Encrypt(key string, plainText []byte) ([]byte, error)

func GetIntByRegex

func GetIntByRegex(text, key string) (int, bool)

func GetMultiWriter

func GetMultiWriter(split int) io.Writer

func GetStrByRegex

func GetStrByRegex(text, key string) (string, bool)

func GetStrDataByRegex

func GetStrDataByRegex(text, key string) (string, bool)

func GetStrQuotByRegex

func GetStrQuotByRegex(text, key string) (string, bool)

func GetXmlByRegex

func GetXmlByRegex(text, key string) (string, bool)

func IsNumeric

func IsNumeric(str string, trim bool) bool

func KeepNewDateLogFile

func KeepNewDateLogFile()

func RandStr

func RandStr(length int64, mod uint32) string

func RemoveNewline

func RemoveNewline(str string) string

移除连着的换行符,最多保留一个,目前用于AI场景

func SubStr

func SubStr(s string, max int) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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