util

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 4 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 DeepCopy

func DeepCopy(original []interface{}) []interface{}

DeepCopy copies an interface[] array

func DeepCopyOfMap

func DeepCopyOfMap(originalMap map[string]interface{}) map[string]interface{}

DeepCopyOfMap copies a map

func Deref added in v1.5.0

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

Deref dereferences pointer values

func GetFieldNames added in v1.4.17

func GetFieldNames[T proto.Message]() (fieldNames []string)

GetFieldNames extracts all field names of a proto.Message T. The extracted names are in lowercase with underscores

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