util

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelCaseToSnakeCase

func CamelCaseToSnakeCase(input string) string

CamelCaseToSnakeCase converts a `camelCase` string to `snake_case`

func Deref added in v1.5.0

func Deref[T any](p *T) T

Deref dereferences pointer values

func GetJSONFilenames added in v1.9.0

func GetJSONFilenames(folder string) ([]string, error)

GetJSONFilenames returns all json files in the given folder

func IsNil added in v1.7.4

func IsNil(value any) bool

IsNil checks if an interface value is nil or if the value nil is assigned to it.

func Ref added in v1.7.0

func Ref[T any](p T) *T

Ref references pointer values

func SafeTimestamp added in v1.5.0

func SafeTimestamp(t *time.Time) int64

SafeTimestamp returns either the UNIX timestamp of the time t or 0 if it is nil

Types

This section is empty.

Jump to

Keyboard shortcuts

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