Nested Structs and non primitive type support
Now it supports both nested structs and typedefs where the type is of struct kind like time.Time
.
// MyStruct is a structure of nonsense
type MyStruct struct {
// Inline the struct
Inline struct {
// FooBar is a even more nonsense variable
FooBar int
}
// MyInt is happy to be after Inline
MyInt int
}
This generates the following ASCIIDOC
=== MyStruct
[source, go]
----
type MyStruct struct {
Inline struct
MyInt int
}
----
MyStruct is a structure of nonsense
==== MyInt int
MyInt is happy to be after Inline
=== Inline
[source, go]
----
struct {
FooBar int
}
----
Inline the struct
==== FooBar int
FooBar is a even more nonsense variable