Documentation ¶
Overview ¶
Package simpleast provides a simple way to inspect Go files and extract structs and methods from them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { Name string `json:"name,omitempty"` DocComment string `json:"doc_comment,omitempty"` Type string `json:"type,omitempty"` Tags StructTags `json:"tags,omitempty"` }
Field represents a Go field of Struct.
type Method ¶
type Method struct { Name string `json:"name,omitempty"` DocComment string `json:"doc_comment,omitempty"` TypeParams []string `json:"type_params,omitempty"` Parameters []Field `json:"parameters,omitempty"` Results []Field `json:"results,omitempty"` // contains filtered or unexported fields }
Method represents a Go method of Struct.
type Struct ¶
type Struct struct { Name string `json:"name,omitempty"` DocComment string `json:"doc_comment,omitempty"` TypeParams []Field `json:"type_params,omitempty"` Fields []Field `json:"fields,omitempty"` Methods []Method `json:"methods,omitempty"` }
Struct represents a Go struct. Fields and Methods are not ordered.
type StructTag ¶
StructTag represents a Go struct field tag.
Click to show internal directories.
Click to hide internal directories.