helpers

package
v0.0.0-...-5cc4ecd Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNumbers

func GetNumbers(amount int, startFrom int) []int

func GetQueryBool

func GetQueryBool(c *fiber.Ctx, param string, def bool) bool

func GetQueryInt

func GetQueryInt(c *fiber.Ctx, param string, def int) int

func GetQueryIntSlice

func GetQueryIntSlice(c *fiber.Ctx, param string, size int) []int

func GetQueryString

func GetQueryString(c *fiber.Ctx, param string, def string) string

func GetRandomBool

func GetRandomBool(chance int) bool

func GetRandomInteger

func GetRandomInteger(min, max int) int

func IndexOf

func IndexOf[T int | string](element T, data []T) int

func PadStart

func PadStart(str string, count int, padStr string) string

func ReadFileLineByLine

func ReadFileLineByLine(path string) ([]string, error)

func RemoveDuplicateStrings

func RemoveDuplicateStrings(strSlice []string) []string

func RemoveElement

func RemoveElement[T any](s []T, i int) []T

func SliceContains

func SliceContains[T int | string](a []T, x T) bool

func SliceStringToInt

func SliceStringToInt(src []string) ([]int, error)

func ThrowError

func ThrowError(c *fiber.Ctx, code int, error 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