util

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 5 Imported by: 0 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 ConcatSlice

func ConcatSlice[T any](first []T, second []T) []T

Concatenates two slices

func Contains

func Contains[T string | int](s []T, e T) bool

func GetFieldMapping added in v1.5.0

func GetFieldMapping(field string) (string, string)

func GetFieldsMapping added in v1.5.0

func GetFieldsMapping(fields []string) map[string]string

func GetRelativeURL

func GetRelativeURL(absURL string) string

Retrives relative URL out of an absolute one

func GetRespValByProp

func GetRespValByProp(val map[string]any, propPath string) any

Extracts value from map by property path

func IsNotFound

func IsNotFound(err error) bool

IsNotFound unwraps API response errors checking for 404 Not Found

func NormalizeEntityName

func NormalizeEntityName(name string) string

func NormalizeEntityNameSnake

func NormalizeEntityNameSnake(name string) string

func RemoveRelativeURLPrefix

func RemoveRelativeURLPrefix(relURL, prefix string) string

Removes relative URL prefix from relative URL case insensitive

Types

This section is empty.

Jump to

Keyboard shortcuts

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