utils

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchBytesCache

func MatchBytesCache(regex *re.Regexp, byteSlice []byte, cacheLife CacheLife) bool

MatchBytesCache 正则表达式匹配字节slice,并缓存结果

func MatchStringCache

func MatchStringCache(regex *re.Regexp, s string, cacheLife CacheLife) bool

MatchStringCache 正则表达式匹配字符串,并缓存结果

Types

type CacheLife added in v1.2.10

type CacheLife = int64
const (
	CacheDisabled   CacheLife = 0
	CacheShortLife  CacheLife = 600
	CacheMiddleLife CacheLife = 1800
	CacheLongLife   CacheLife = 7200
)

Jump to

Keyboard shortcuts

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