MCPcopy Index your code
hub / github.com/zeromicro/go-zero / checkTypeStmt

Method checkTypeStmt

tools/goctl/pkg/parser/api/parser/api.go:155–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153}
154
155func (api *API) checkTypeStmt() error {
156 f := newFilter()
157 b := f.addCheckItem(api.Filename, "type expression")
158 for _, v := range api.TypeStmt {
159 switch val := v.(type) {
160 case *ast.TypeLiteralStmt:
161 b.check(val.Expr.Name)
162 case *ast.TypeGroupStmt:
163 for _, expr := range val.ExprList {
164 b.check(expr.Name)
165 }
166 }
167 }
168 return f.error()
169}
170
171func (api *API) checkTypeDeclareContext() error {
172 var typeMap = map[string]placeholder.Type{}

Callers 1

SelfCheckMethod · 0.95

Calls 4

newFilterFunction · 0.85
addCheckItemMethod · 0.80
checkMethod · 0.65
errorMethod · 0.45

Tested by

no test coverage detected