util

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsAlnum = regexp.MustCompile(`^[[:alnum:]]+$`).MatchString
View Source
var IsAlpha = regexp.MustCompile(`^[[:alpha:]]+$`).MatchString

Functions

func AllEqual

func AllEqual[T comparable](values ...T) bool

func Clamp

func Clamp(a, b, c int) int

func EqualDomains

func EqualDomains(u ...string) bool

func Has

func Has[T comparable](needle T, haystack []T) bool

func IMax

func IMax(a, b int) int

func IMin

func IMin(a, b int) int

func IsAlnumRune

func IsAlnumRune(r rune) bool

func IsJapanese

func IsJapanese(s string) bool

IsJapanese returns true if any of the characters inside of the string are within Japanese unicode ranges.

func SendMail added in v0.1.2

func SendMail(ctx context.Context, to []string, subject, contents string)

SendMail sends an email.

func Trim

func Trim(s string, maxLen int) string

func ValidHost

func ValidHost(host string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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