Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValidationKeys ¶
func GetValidationKeys(fname string, fset *token.FileSet, funcDecl *ast.FuncDecl, imports map[string]string) map[int]string
Scan app source code for calls to X.Y(), where X is of type *Validation.
Recognize these scenarios:
- "Y" = "Validation" and is a member of the receiver. (The common case for inline validation)
- "X" is passed in to the func as a parameter. (For structs implementing Validated)
The line number to which a validation call is attributed is that of the surrounding ExprStmt. This is so that it matches what runtime.Callers() reports.
The end result is that we can set the default validation key for each call to be the same as the local variable.
func ProcessSource ¶
func ProcessSource(paths *model.RevelContainer) (*model.SourceInfo, *utils.Error)
ProcessSource parses the app controllers directory and returns a list of the controller types found. Otherwise CompileError if the parsing fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.