utils

package
v1.1.1-0...-a9d3591 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString(n int) (string, error)

GenerateRandomString generates a cryptographically random, alphanumeric string of length n.

func SanitizeURI

func SanitizeURI(u string) string

SanitizeURI takes a URL or URI, removes the domain from it, returns only the URI. This is used for cleaning "next" redirect URLs/URIs to prevent open redirects.

func ValidateEmail

func ValidateEmail(email string) bool

ValidateEmail validates whether the given string is a correctly formed e-mail address.

Types

This section is empty.

Jump to

Keyboard shortcuts

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