Documentation
¶
Index ¶
Constants ¶
View Source
const ( StartOfStruct = iota FieldDefinition )
Line Type
Variables ¶
This section is empty.
Functions ¶
func IsStructStart ¶
IsStructStart returns true if the line is the start of a struct.
Types ¶
type Line ¶
type Line struct { Raw string // raw line Name string // StructName Type int // Type of line Field Field // translated directly to go Tags []string }
Line is a line in an rx file.
func FileToLines ¶
FileToLines builds a slice of lines. Each line object is a breakdown of a line in the file for easier processing later.
func NewLine ¶
NewLine return an object representing a line in an rsl file. Source can look like one of these: type 1: A struct start
[Person]
type 2: Member variables
Name:string:required|json:name,omitempty
Return an error if the line is empty.
func (*Line) IsStartOfStruct ¶
func (*Line) StructName ¶
StructName returns the name of the struct parsed from the line.
type StructDef ¶
StructDef represents the rsl file.
func LinesToStructs ¶
LinesToStructs builds a slice of Struct definitions from the lines we filtered earlier.
Click to show internal directories.
Click to hide internal directories.