helpers

package
v0.0.435 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBoolean

func NewBoolean(value bool) *bool

NewBoolean allocates a new bool in the heap and returns a pointer to it.

func NewDate

func NewDate(value time.Time) *time.Time

NewDate allocates a new date in the heap and returns a pointer to it.

func NewFloat

func NewFloat(value float64) *float64

NewFloat allocates a new floating point value in the heap and returns an pointer to it.

func NewInteger

func NewInteger(value int) *int

NewInteger allocates a new integer in the heap and returns a pointer to it.

func NewIterator

func NewIterator(source interface{}) (iterator *jsoniter.Iterator, err error)

NewIterator creates a new JSON iterator that will read to the given source, which can be a slice of bytes, a string, a reader or an existing iterator.

func NewStream

func NewStream(writer io.Writer) *jsoniter.Stream

NewStream creates a new JSON stream that will write to the given writer.

func NewString

func NewString(value string) *string

NewString allocates a new string in the heap and returns a pointer to it.

func ParseBoolean

func ParseBoolean(query url.Values, parameterName string) (*bool, error)

ParseBoolean reads a string and parses it to boolean, if an error occurred it returns a non-nil error.

func ParseDate

func ParseDate(query url.Values, parameterName string) (*time.Time, error)

ParseDate reads a string and parses it to a time.Time, if an error occurred it returns a non-nil error.

func ParseFloat

func ParseFloat(query url.Values, parameterName string) (*float64, error)

ParseFloat reads a string and parses it to float, if an error occurred it returns a non-nil error.

func ParseInteger

func ParseInteger(query url.Values, parameterName string) (*int, error)

ParseInteger reads a string and parses it to integer, if an error occurred it returns a non-nil error.

func ParseString

func ParseString(query url.Values, parameterName string) (*string, error)

ParseString returns a pointer to the string and nil error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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