helpers

package
v1.61.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatasetVersionURL added in v1.56.0

func DatasetVersionURL(datasetID, edition, version string) string

DatasetVersionURL constructs a dataset version URL from the provided datasetID, edition and version values

func ExtractDatasetInfoFromPath

func ExtractDatasetInfoFromPath(path string) (datasetID, edition, version string, err error)

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

func GenerateSharingLink(socialType, currentURL, title string) string

GenerateSharingLink returns a sharing link for different types of social media

func GetAPIRouterVersion added in v1.18.0

func GetAPIRouterVersion(rawurl string) (string, error)

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

func GetCurrentURL added in v1.56.0

func GetCurrentURL(lang, siteDomain, urlPath string) string

GetCurrentURL returns a string of the current URL from language, site domain and url path parameters

func HasStringInSlice added in v1.39.0

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

HasStringInSlice checks for a string within in a string array

func IsBoolPtr added in v1.34.0

func IsBoolPtr(val *bool) bool

IsBoolPtr determines if the given value is a pointer

func PersistExistingParams added in v1.39.0

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

PersistExistingParams persists existing query string values and ignores a given value

func ToBoolPtr added in v1.39.0

func ToBoolPtr(val bool) *bool

ToBoolPtr converts a boolean to a pointer

Types

This section is empty.

Jump to

Keyboard shortcuts

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