option

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompileOption

type CompileOption func(o *CompileOptions)

func WithCompileRecursiveDepth

func WithCompileRecursiveDepth(depth int) CompileOption

WithCompileRecursiveDepth sets the depth of recursive compile in decoder or encoder.

Default value(0) is suitable for basic types and small nested struct types.

For large or deep nested struct, try to set larger depth to reduce compile time in the first Marshal or Unmarshal.

type CompileOptions

type CompileOptions struct {
	// the depth for recursive compile
	RecursiveDepth int
}

CompileOptions includes all options for encoder or decoder compiler.

func DefaultCompileOptions

func DefaultCompileOptions() CompileOptions

Jump to

Keyboard shortcuts

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