util

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolP added in v0.1.0

func BoolP(b bool) *bool

func Contains

func Contains[T comparable](slice []T, value T) bool

contains is a helper function that iterates over a slice and returns true if the given value is found

func Dedup

func Dedup[T comparable](s []T) []T

Dedup removes duplicate strings from a slice

func MapP

func MapP(m map[string]interface{}) *map[string]interface{}

func NullBool added in v0.3.0

func NullBool(b bool) sql.NullBool

func NullInt32 added in v0.3.0

func NullInt32(i int32) sql.NullInt32

func NullStr added in v0.3.0

func NullStr(s string) sql.NullString

func NullTime added in v0.3.0

func NullTime(t time.Time) sql.NullTime

func NullUUID added in v0.3.0

func NullUUID(u uuid.UUID) uuid.NullUUID

func SortSliceInt32 added in v0.3.0

func SortSliceInt32(s []int32)

func StrP

func StrP(s string) *string

func TimeP added in v0.3.0

func TimeP(t time.Time) *time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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