parse

package module
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: BSD-2-Clause Imports: 13 Imported by: 2

README

Parse

This repo contains parse helps.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidTypeError = stderrors.New("invalid type")

Functions

func ParseASCII added in v1.8.0

func ParseASCII(ctx context.Context, value interface{}) (string, error)

ParseASCII returns a the given string converted to ascii

func ParseAscii deprecated

func ParseAscii(ctx context.Context, value interface{}) (string, error)

ParseAscii returns a the given string converted to ascii

Deprecated: Use ParseASCII instead.

func ParseBool

func ParseBool(ctx context.Context, value interface{}) (bool, error)

func ParseBoolDefault

func ParseBoolDefault(ctx context.Context, value interface{}, defaultValue bool) bool

func ParseFloat64

func ParseFloat64(ctx context.Context, value interface{}) (float64, error)

func ParseFloat64Default

func ParseFloat64Default(ctx context.Context, value interface{}, defaultValue float64) float64

func ParseInt

func ParseInt(ctx context.Context, value interface{}) (int, error)

func ParseInt64

func ParseInt64(ctx context.Context, value interface{}) (int64, error)

func ParseInt64Array

func ParseInt64Array(ctx context.Context, value interface{}) ([]int64, error)

func ParseInt64ArrayDefault

func ParseInt64ArrayDefault(ctx context.Context, value interface{}, defaultValue []int64) []int64

func ParseInt64ArrayFromInterfaces

func ParseInt64ArrayFromInterfaces(ctx context.Context, values []interface{}) ([]int64, error)

func ParseInt64Default

func ParseInt64Default(ctx context.Context, value interface{}, defaultValue int64) int64

func ParseIntArray

func ParseIntArray(ctx context.Context, value interface{}) ([]int, error)

func ParseIntArrayDefault

func ParseIntArrayDefault(ctx context.Context, value interface{}, defaultValue []int) []int

func ParseIntArrayFromInterfaces

func ParseIntArrayFromInterfaces(ctx context.Context, values []interface{}) ([]int, error)

func ParseIntDefault

func ParseIntDefault(ctx context.Context, value interface{}, defaultValue int) int

func ParseString

func ParseString(ctx context.Context, value interface{}) (string, error)

func ParseStringDefault

func ParseStringDefault(ctx context.Context, value interface{}, defaultValue string) string

func ParseStrings

func ParseStrings(ctx context.Context, value interface{}) ([]string, error)

func ParseStringsDefault

func ParseStringsDefault(ctx context.Context, value interface{}, defaultValue []string) []string

func ParseTime

func ParseTime(ctx context.Context, value interface{}, format string) (time.Time, error)

func ParseTimeDefault

func ParseTimeDefault(
	ctx context.Context,
	value interface{},
	format string,
	defaultValue time.Time,
) time.Time

func ToInterfaceList

func ToInterfaceList[T any](values []T) []interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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