utils

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetQueryParamListValues

func GetQueryParamListValues(queryVars url.Values, varKey string, maxNumItems int) (items []string, err error)

GetQueryParamListValues obtains a list of strings from the provided queryVars, by parsing all values with key 'varKey' and splitting the values by commas, if they contain commas. Up to maxNumItems values are allowed in total.

func Slice

func Slice(full []models.Dimension, offset, limit int) (sliced []models.Dimension)

Slice is a utility function to cut a slice according to the provided offset and limit.

func SliceStr added in v1.30.0

func SliceStr(full []*string, offset, limit int) (sliced []*string)

SliceStr is a utility function to cut a slice of *strings according to the provided offset and limit.

func ValidatePositiveInt

func ValidatePositiveInt(parameter string) (val int, err error)

ValidatePositiveInt obtains the positive int value of query var defined by the provided varKey

Types

This section is empty.

Jump to

Keyboard shortcuts

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