tons of code
This commit is contained in:
parent
8be9d454d5
commit
57835e81ac
@ -46,11 +46,11 @@ func (g *GoApiParser) Parse(sourceFile string) (*api.Api, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
structType, ok := typeSpec.Type.(*ast.StructType)
|
||||
if !ok {
|
||||
_, isStruct := typeSpec.Type.(*ast.StructType)
|
||||
_, isIface := typeSpec.Type.(*ast.InterfaceType)
|
||||
if !isStruct && !isIface {
|
||||
continue
|
||||
}
|
||||
_ = structType
|
||||
|
||||
apis.Endpoints = append(apis.Endpoints, api.Endpoint{
|
||||
Name: typeSpec.Name.Name,
|
||||
@ -96,8 +96,8 @@ func (g *GoApiParser) Parse(sourceFile string) (*api.Api, error) {
|
||||
var apiPar api.Val
|
||||
ident := param.Type.(*ast.Ident)
|
||||
switch ident.Name {
|
||||
case "int":
|
||||
apiPar.Type = api.TInt
|
||||
//case "int":
|
||||
// apiPar.Type = api.TInt
|
||||
case "string":
|
||||
apiPar.Type = api.TString
|
||||
case "bool":
|
||||
|
||||
@ -107,8 +107,8 @@ func (t *TypescriptApiParser) Parse(sourceFilePath string) (*api.Api, error) {
|
||||
if method.Type != nil {
|
||||
var apiRet api.Val
|
||||
switch method.Type.Kind {
|
||||
case ast.KindNumberKeyword:
|
||||
apiRet.Type = api.TInt
|
||||
//case ast.KindNumberKeyword:
|
||||
// apiRet.Type = api.TInt
|
||||
case ast.KindStringKeyword:
|
||||
apiRet.Type = api.TString
|
||||
case ast.KindBooleanKeyword:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user