g

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelToSnake

func CamelToSnake(s string) string

func ChangeJsonKeys added in v1.1.0

func ChangeJsonKeys(input []byte, f func(s string) string) []byte

func FromStrings

func FromStrings[T ~string](strings []string) []T

func Must added in v1.0.0

func Must[T any](t *T, err error) T

func NilToNil

func NilToNil[I any, O any](f func(i I) O, i *I) *O

NilToNil receive function adopts function for converting any types to works with pointers

func NilToNilError

func NilToNilError[I any, O any](f func(i I) (O, error), i *I) (*O, error)

NilToNilError receive function adopts function for converting any types to works with pointers

func Opt added in v1.0.0

func Opt[T any](t *T) struct {
	Value T
	Set   bool
}

func Pointer

func Pointer[T any](o T) *T

Pointer returns pointer to copy of object

func ToStrings

func ToStrings[T fmt.Stringer](ts []T) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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