slice

package
v0.0.0-...-afa1830 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(slice []string, elem string) bool

ContainsString returns true if the received element is found in the received slice

func FromMapValues

func FromMapValues(input map[string]string) []string

FromMapValues returns as a slice of strings all values found in the received maps

func FromStrCommaSeparatedList

func FromStrCommaSeparatedList(commaSepList *string, appendix *string) []string

FromStrCommaSeparatedList returns a list of string using the received string pointer and splitting it on non-nil using comma as separator appendix is a string that will be added to the final list if set

func MergeOnUnique

func MergeOnUnique(a []string, b []string) []string

func StrIntersect

func StrIntersect(a []string, b []string) []string

StrIntersect return the intersection of the two received slice of strings, based on the input a.

func StringToInterface

func StringToInterface(x []string) []interface{}

StringToInterface transform a slice of strings to a slice of interfaces It is particularly useful when building SQLBoiler WhereIn query because the function only takes slice of interfaces as argument

Types

This section is empty.

Jump to

Keyboard shortcuts

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