Documentation
¶
Overview ¶
Copyright 2022 Reto Gantenbein SPDX-License-Identifier: Apache-2.0
Index ¶
- func Contains[T comparable](s []T, e T) bool
- func FilenameFromUri(uri string) string
- func FilepathFromUri(uri string) string
- func KeysFromMap[T constraints.Ordered, S any](a map[T]S) []T
- func ListDifference[T comparable](a []T, b []T) []T
- func ListIntersection[T comparable](a []T, b []T) []T
- func RouteFromUri(uri string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilenameFromUri ¶
FilenameFromUri returns the last element of an URI If the URI is empty, FilenameFromUri returns "/".
func FilepathFromUri ¶
FilepathFromUri returns all but the last element of an URI If the URI is empty, FilepathFromUri returns "/".
func KeysFromMap ¶
func KeysFromMap[T constraints.Ordered, S any](a map[T]S) []T
Return a list of the keys of a map
func ListDifference ¶
func ListDifference[T comparable](a []T, b []T) []T
Return the difference of 2 lists (items in `a` that don’t exist in `b`)
func ListIntersection ¶
func ListIntersection[T comparable](a []T, b []T) []T
Return the intersection of 2 lists (unique list of all items in both)
func RouteFromUri ¶
RouteFromUri returns the element before the second "/".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.