utils

package
v0.0.0-...-385357b Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const BASE_CHAR = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
View Source
const NormalConsoleWidth = 80

Variables

This section is empty.

Functions

func CheckCertWithDomain

func CheckCertWithDomain(cert *x509.Certificate, domain string) bool

func CheckCertWithTime

func CheckCertWithTime(cert *x509.Certificate, gracePeriod time.Duration) bool

func CountSpaceInStringPrefix

func CountSpaceInStringPrefix(str string) int

func EncodePrivateKeyToPEM

func EncodePrivateKeyToPEM(privateKey crypto.PrivateKey) ([]byte, error)

func FormatTextToWidth

func FormatTextToWidth(text string, width int) string

func FormatTextToWidthAndPrefix

func FormatTextToWidthAndPrefix(text string, prefixWidth int, overallWidth int) string

func GetArgs0

func GetArgs0() string

func GetArgs0Name

func GetArgs0Name() string

func InvalidPhone

func InvalidPhone(phone string) bool

func IsGoodQueryKey

func IsGoodQueryKey(key string) bool

func IsValidDomain

func IsValidDomain(domain string) bool

func IsValidEmail

func IsValidEmail(email string) bool

func IsValidHTTPHeaderKey

func IsValidHTTPHeaderKey(key string) bool

func IsValidURLPath

func IsValidURLPath(path string) bool

func Rand

func Rand() *rand.Rand

func RandStr

func RandStr(length int) string

func ReadCertificate

func ReadCertificate(data []byte) (*x509.Certificate, error)

func ReadPrivateKey

func ReadPrivateKey(data []byte) (crypto.PrivateKey, error)

func SayGoodByef

func SayGoodByef(format string, args ...interface{})

func SayHellof

func SayHellof(format string, args ...interface{})

func StringToOnlyPrint

func StringToOnlyPrint(str 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