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

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