diff --git a/kitcom/golang/goparser.go b/kitcom/golang/goparser.go index be28405..1fa9eef 100644 --- a/kitcom/golang/goparser.go +++ b/kitcom/golang/goparser.go @@ -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": diff --git a/kitcom/ts/tsparser.go b/kitcom/ts/tsparser.go index 444dc14..a3e2ee3 100644 --- a/kitcom/ts/tsparser.go +++ b/kitcom/ts/tsparser.go @@ -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: