helpers

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeIllegalCharacters

func EscapeIllegalCharacters(data string) string

func EscapeIllegalCharactersJson

func EscapeIllegalCharactersJson(data json.RawMessage) json.RawMessage

func Ptr

func Ptr[T any](v T) *T

func ResolvePointers

func ResolvePointers[T any](list []*T) []T

func Ternary

func Ternary[T any](flag bool, first T, second T) T

func Unmarshal

func Unmarshal[T any](v T, data []byte) (T, error)

func ValurOrDefault added in v0.4.4

func ValurOrDefault[T any](v *T, d T) T

func ZeroIfNil

func ZeroIfNil[T any](v *T) T

Types

type Interval

type Interval struct {
	From  int
	Limit int
}

func GenerateIntervals

func GenerateIntervals(from, limit int, skip []int) []Interval

Jump to

Keyboard shortcuts

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