utils

package
v0.0.0-...-f7ec041 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: AGPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtMost

func AtMost(n, min, max uint64) uint64

AtMost check if n is valid uint64 value between min and max. In that case, it returns "n", otherwise return max

func Gravatar

func Gravatar(email string) *url.URL

Gravatar returns the gravatar url of the given email

func InSlice

func InSlice(value, slice interface{}) bool

InSlice returns true if value is in slice

func ParseTag

func ParseTag(str string) map[string]string

ParseTag parse the string str, that represents a struct tag in his format than returns a map of tags present with their associated values

func ReverseSlice

func ReverseSlice(slice interface{}) interface{}

ReverseSlice reverse slice if slice is of type reflect.Slice or reflrect.Ptr (to silce) panics if slice type is different

func UpperFirst

func UpperFirst(s string) string

UpperFirst returns a copy of the s string, with the first letter capitalized

Types

This section is empty.

Jump to

Keyboard shortcuts

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