util

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsSHA256

func AsSHA256(o interface{}) string

func Atof64

func Atof64(val string, defaultVal float64) float64

func Atoi

func Atoi(val string, defaultVal int) int

func BoolOrDefault

func BoolOrDefault(val *bool, defaultVal bool) bool

func ContainsMovieCategory added in v0.3.2

func ContainsMovieCategory(cats []string) bool

func ContainsTvCategory added in v0.3.2

func ContainsTvCategory(cats []string) bool

func JoinURL

func JoinURL(base string, paths ...string) string

func NewRetryableHttpClient

func NewRetryableHttpClient(timeout time.Duration, rl ratelimit.Limiter, log *zerolog.Logger) *http.Client

func StringOrDefault

func StringOrDefault(val string, defaultVal string) string

func StringSliceContains

func StringSliceContains(slice []string, val string) bool

func StringSliceContainsAny

func StringSliceContainsAny(slice []string, vals []string) bool

func StringSliceMergeUnique

func StringSliceMergeUnique(existingSlice []string, mergeSlice []string) []string

func StripNonAlphaNumeric

func StripNonAlphaNumeric(value string) string

func StripNonNumeric

func StripNonNumeric(value string) string

func URLWithQuery

func URLWithQuery(base string, q url.Values) (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