Commit 86663a3c authored by Boris Mühmer's avatar Boris Mühmer
Browse files

added struct tags

parent 87037b5f
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -10,21 +10,21 @@ import (
)

type Foo struct {
	F  string
	O1 string
	O2 string
	F  string `json:"f,omitempty" yaml:"f,omitempty"`
	O1 string `json:"o1,omitempty" yaml:"o1,omitempty"`
	O2 string `json:"o2,omitempty" yaml:"o2,omitempty"`
}

type Bar struct {
	B string
	A string
	R string
	B string `json:"b,omitempty" yaml:"b,omitempty"`
	A string `json:"a,omitempty" yaml:"a,omitempty"`
	R string `json:"r,omitempty" yaml:"r,omitempty"`
}

type Example struct {
	Name string
	Foos []Foo
	Bars []Bar
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	Foos []Foo  `json:"foos,omitempty" yaml:"foos,omitempty"`
	Bars []Bar  `json:"bars,omitempty" yaml:"bars,omitempty"`
}

func createExample() *Example {