helpers

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasStringInSlice

func HasStringInSlice(a string, list []string) bool

HasStringInSlice checks for a string within in a string array

func IsBoolPtr added in v1.27.0

func IsBoolPtr(val *bool) bool

IsBoolPtr determines if the given value is a pointer

func PersistExistingParams

func PersistExistingParams(values []string, key, ignoreValue string, q url.Values)

PersistExistingParams persists existing query string values and ignores a given value

func Pluralise added in v1.7.0

func Pluralise(req *http.Request, key, lang, keyPrefix string, plural int) string

Pluralise performs a toml file lookup to return the pluralised lookup value from a given key. This function is intended not to panic if the toml file lookup fails. req is the *http.Request, required for logging. key is the key to lookup in the toml file. lang is the language. keyPrefix is an optional prefix to the key string. plural is the plural int required for toml file lookup.

func ToBoolPtr added in v1.4.0

func ToBoolPtr(val bool) *bool

ToBoolPtr converts a boolean to a pointer

func TrimCategoryValue added in v1.19.1

func TrimCategoryValue(s string) string

TrimCategoryValue trims _[0-9] from the given string and returns the result

Types

This section is empty.

Jump to

Keyboard shortcuts

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