testpkg

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array struct {
	List []string
}

func (*Array) UnmarshalMap

func (s *Array) UnmarshalMap(m map[string]interface{}) error

UnmarshalMap takes a map and unmarshals the fieds into the struct

type Composed

type Composed struct {
	Embedded
	Base string
}

func (*Composed) UnmarshalMap

func (s *Composed) UnmarshalMap(m map[string]interface{}) error

UnmarshalMap takes a map and unmarshals the fieds into the struct

type Embedded

type Embedded struct {
	Field string
}

type Nested

type Nested struct {
	First  Embedded
	Second *Embedded
	Third  []Embedded
	Fourth []*Embedded
	Fifth  [3]Embedded
	Sixth  [3]*Embedded
}

func (*Nested) UnmarshalMap

func (s *Nested) UnmarshalMap(m map[string]interface{}) error

UnmarshalMap takes a map and unmarshals the fieds into the struct

type SimpleStruct

type SimpleStruct struct {
	SimpleField             string
	SimpleJSONTagged        string  `json:"field2"`
	SimpleJSONTaggedOmitted string  `json:"field3,omitempty"`
	SimpleOmitEmptyNoName   string  `json:",omitempty"`
	SimpleSkipped           string  `json:"-,omitempty"`
	SimplePointer           *string `json:"pointer"`
	SimpleInteger           int     `json:"integer"`
	SimpleIntegerPtr        *int    `json:"integer_ptr"`
	Ignored                 string  `json:"-"`
}

func (*SimpleStruct) UnmarshalMap

func (s *SimpleStruct) UnmarshalMap(m map[string]interface{}) error

UnmarshalMap takes a map and unmarshals the fieds into the struct

Jump to

Keyboard shortcuts

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