helpers

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAllDimensionsHaveAnOption added in v1.36.0

func CheckAllDimensionsHaveAnOption(dims []filter.ModelDimension) (check bool, err error)

Check each dimension has an option selected

func ExtractDatasetInfoFromPath

func ExtractDatasetInfoFromPath(ctx context.Context, path string) (datasetID, edition, version string, err error)

ExtractDatasetInfoFromPath gets the datasetID, edition and version from a given path

func GetAPIRouterVersion added in v1.24.0

func GetAPIRouterVersion(rawurl string) (string, error)

GetAPIRouterVersion returns the path of the provided url, which corresponds to the api router version

func StringInSlice added in v1.28.0

func StringInSlice(str string, slice []string) (int, bool)

StringInSlice will check if a string is in a slice and return a corresponding boolean value along with the first index it was found at. If not present then it will return false and negative -1

func TitleCaseStr added in v1.39.0

func TitleCaseStr(input string) string

TitleCaseStr is a helper function that returns a given string in title case

Types

This section is empty.

Jump to

Keyboard shortcuts

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