Skip to content

Behavior of complex types #13

@ianlopshire

Description

@ianlopshire

The behavior of more complex types need to be defined/implemented.

  • nested structs with tag
  • nested structs without tag
  • embedded struct with tag
  • embedded struct without tag
type Nested struct {
	F1 string `fixed:"1,10"`
	F2 struct {
		E1 string `fixed:"11,20"`
		E2 string `fixed:"21,30"`
	}
}

type NestedWithTag struct {
	F1 string `fixed:"1,10"`
	F2 struct {
		E1 string `fixed:"1,10"`
		E2 string `fixed:"11,20"`
	} `fixed:"11,30"`
}

type S1 struct {
	F1 string `fixed:"1,10"`
	F4 string `fixed:"31,40"`
}

type Embedded struct {
	S1
	F2 string `fixed:"11,20"`
	F3 string `fixed:"21,30"`
}

type S2 struct {
	F3 string `fixed:"1,10"`
	F4 string `fixed:"11,20"`
}

type EmbeddedWithTag struct {
	F2 string `fixed:"1,10"`
	F3 string `fixed:"11,20"`
	S2 `fixed:"21,40"`
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions