matchers

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PatternToken     = `^(xox[p|b|o|a]-\d{10,12}-\d{12,13}-\w+)|(\d{9}:[a-zA-Z0-9_-]{35})|([MN][A-Za-z\d]{23}\.[\w-]{6}\.[\w-]{27})$`
	PatternChannel   = `^([A-Z0-9]{9,18})$`
	PatternColor     = `^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|(\d{1,8})$`
	PatternLogformat = `\$(remote_(addr|user)|request_(method|uri|protocol)|http_(referer|user_agent))`
)

Variables

This section is empty.

Functions

func IsChannel

func IsChannel(s string)

IsChannel validates the channel for Slack & Discord

func IsChatID

func IsChatID(s string)

IsChatID validates the chat_id for Telegram

func IsColor

func IsColor(s string)

IsColor validates the color code

func IsLogformat

func IsLogformat(s string)

IsLogformat validates structured log format

func IsMatch

func IsMatch(pattern string, s string) bool

func IsMatchFuzz added in v1.2.0

func IsMatchFuzz(pattern string, s []string) bool

func IsToken

func IsToken(s string)

IsToken validates the token

Types

This section is empty.

Jump to

Keyboard shortcuts

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