embedded

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Explode

func Explode(v reflect.Value, t reflect.Type, m map[int]Unembeddeds, namespace *string, c *int, x []int)

Explode catalogs all fields info necessary to subsequently create StructField. The catalog will of course contain all fields at the base of the top level struct. However, any encountered anonymous/embedded fields will be recursively scanned to also include their fields too, in the same collection.

// NOTE(roninzo): Explode avoids scanning potential embedded struct from third party types // (such as time.Time, reflect.Value, etc.) by only expanding on structs that are declared locally to the current package. // Hence, the use of the namespace in the program.

Types

type Unembeddeds

type Unembeddeds struct {
	Index       int
	Indexes     []int
	Name        string
	Value       reflect.Value
	StructField reflect.StructField
	Type        reflect.Type
}

Jump to

Keyboard shortcuts

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