github.com/jd-ly/cmd@v1.0.10/model/method.go (about)

     1  package model
     2  
     3  // methodCall describes a call to c.Render(..)
     4  // It documents the argument names used, in order to propagate them to RenderArgs.
     5  type MethodCall struct {
     6  	Path  string // e.g. "myapp/app/controllers.(*Application).Action"
     7  	Line  int
     8  	Names []string
     9  }
    10  
    11  // MethodSpec holds the information of one Method
    12  type MethodSpec struct {
    13  	Name        string        // Name of the method, e.g. "Index"
    14  	Args        []*MethodArg  // Argument descriptors
    15  	RenderCalls []*MethodCall // Descriptions of Render() invocations from this Method.
    16  }
    17  
    18  // MethodArg holds the information of one argument
    19  type MethodArg struct {
    20  	Name       string   // Name of the argument.
    21  	TypeExpr   TypeExpr // The name of the type, e.g. "int", "*pkg.UserType"
    22  	ImportPath string   // If the arg is of an imported type, this is the import path.
    23  }