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

Method mergeAPI

tools/goctl/pkg/parser/api/parser/api.go:248–260  ·  view source on GitHub ↗
(in *API)

Source from the content-addressed store, hash-verified

246}
247
248func (api *API) mergeAPI(in *API) error {
249 if api.Syntax.Value.Format() != in.Syntax.Value.Format() {
250 return ast.SyntaxError(
251 in.Syntax.Value.Pos(),
252 "multiple syntax value expression, expected <%s>, got <%s>",
253 api.Syntax.Value.Format(),
254 in.Syntax.Value.Format(),
255 )
256 }
257 api.TypeStmt = append(api.TypeStmt, in.TypeStmt...)
258 api.ServiceStmts = append(api.ServiceStmts, in.ServiceStmts...)
259 return nil
260}
261
262func (api *API) parseImportedAPI(imports []ast.ImportStmt) ([]*API, error) {
263 var list []*API

Callers 1

parseReverseMethod · 0.95

Calls 3

SyntaxErrorFunction · 0.92
FormatMethod · 0.65
PosMethod · 0.65

Tested by

no test coverage detected