util

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 3 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(msg proto.Message) (fieldNames []string)

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

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