extlib

package
v0.0.0-...-a992749 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ErrInvalidUrl = "specified url is not valid"

Variables

This section is empty.

Functions

func ExtensionFromContentType

func ExtensionFromContentType(contentType string) (string, error)

func RandomHexString

func RandomHexString(length int) (string, error)

func RandomToken

func RandomToken(length int) (string, error)

func SQLQueryPlaceholders

func SQLQueryPlaceholders(length int) string

func SliceFilter

func SliceFilter[T any](slice []T, cap int, predicate func(T) bool) []T

func SliceFilterBackwards

func SliceFilterBackwards[T any](slice []T, cap int, predicate func(T) bool) []T

func SlicePaginate

func SlicePaginate[T any](slice []T, page, limit int) []T

func SliceRemoveElement

func SliceRemoveElement[T any](slice []T, index int) []T

func SliceReverse

func SliceReverse[T any](slice []T) []T

func ValidateURL

func ValidateURL(u string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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