scalar

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDereference

func EnsureDereference(value interface{}) reflect.Type

func ParseTag

func ParseTag(tag reflect.StructTag) fieldTag

Types

type FieldStringifierFn

type FieldStringifierFn = func(pointer unsafe.Pointer) (string, bool)

func Stringifier

func Stringifier(field *xunsafe.Field, nullifyZeroValue bool, nullValue string, options ...interface{}) FieldStringifierFn

type ObjectStringifier

type ObjectStringifier struct {
	// contains filtered or unexported fields
}

func TypeStringifier

func TypeStringifier(rType reflect.Type, nullValue string, omitTransient bool, options ...interface{}) *ObjectStringifier

TypeStringifier returns ObjectStringifier for a given Type. It will replace nil values with nullValue for properties with tag: "nullifyEmpty" and omit (if specified) transient properties By default, results are shared, no new arrays are returned unless Parallel(true) is provided as an option.

func (*ObjectStringifier) FieldNames

func (s *ObjectStringifier) FieldNames() []string

func (*ObjectStringifier) Has

func (s *ObjectStringifier) Has(fieldName string) bool

func (*ObjectStringifier) Stringifier

func (s *ObjectStringifier) Stringifier(options ...interface{}) (ObjectStringifierFn, error)

type ObjectStringifierFn

type ObjectStringifierFn func(val interface{}) ([]string, []bool)

ObjectStringifierFn returns stringified object properties values and information if value was string before

type Parallel

type Parallel bool

type StringifierConfig

type StringifierConfig struct {
	Fields                   []string
	CaseFormat               format.CaseFormat
	StringifierFloat32Config StringifierFloat32Config
	StringifierFloat64Config StringifierFloat64Config
}

StringifierConfig represents stringifier config

type StringifierFloat32Config

type StringifierFloat32Config struct {
	Precision string
}

StringifierFloat32Config represents stringifier float32 config

type StringifierFloat64Config

type StringifierFloat64Config struct {
	Precision string
}

StringifierFloat64Config represents stringifier float64 config

type ValueAccessor

type ValueAccessor = func(int) interface{}

func Values

func Values(value interface{}) (ValueAccessor, int, error)

Jump to

Keyboard shortcuts

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