utils

package
v0.0.0-...-1381a07 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCharRedundant

func CheckCharRedundant(source string, char string) bool

CheckCharRedundant verify is a character is redundant in a string.

func FileExist

func FileExist(path string) bool

FileExist verify if a file exist.

func GenerateURL

func GenerateURL(length uint8) string

GenerateURL generate random string for plak url.

func ParseExpiration

func ParseExpiration(source string) (int, error)

ParseExpiration Parse "1d1h1m1s" duration format. Return 0 & error if error.

func ValidKey

func ValidKey(key string) bool

ValidKey Verify if a key is valid (only letter, number, - and _).

Types

type ParseExpirationError

type ParseExpirationError struct {
	// contains filtered or unexported fields
}

func (*ParseExpirationError) Error

func (m *ParseExpirationError) Error() string

Jump to

Keyboard shortcuts

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