g

package
v0.0.0-...-c305843 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 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

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

func FromStrings

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

func Must

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

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