Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(s interface{}) interface{}
Generate constructs a documentation interface from the provided struct by using the struct field types as well as the information given in the "doc" struct tag. In the doc tag the following information can be given in a comma-separated list:
- msg: describing message
- default: default value
- req: required field
- option,o: 1 possible value (multiple values are specified by multiple occurrences)
e.g.: `doc:"msg=this is my message,default=0,o=0, o=1, req"`. If no "doc" tag is present the field will be ignored. The output format is map[string]interface{}, where the interface is either a doc-string or a substructure of the same format.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.