diff --git a/class.go b/class.go index 6f33fa2..4197904 100644 --- a/class.go +++ b/class.go @@ -11,7 +11,6 @@ import ( "text/template" "github.com/PuerkitoBio/goquery" - "github.com/davecgh/go-spew/spew" ) //go:embed class.tmpl @@ -215,7 +214,7 @@ func getConstructor(dataContainer *goquery.Selection) (Constructor, error) { // 1 parameters // 2 returns state := 0 - children := descriptor.Children() + children := descriptor.Eq(0).Children() childrenLength := children.Length() children.Each(func(i int, s *goquery.Selection) { if i == childrenLength-1 { @@ -251,11 +250,13 @@ func getConstructor(dataContainer *goquery.Selection) (Constructor, error) { cparam.Comment = CleanUp(cleanText) } } + case 2: + log.Printf("%#v", s.Text()) } } }) - spew.Dump(resConstructor) + // spew.Dump(resConstructor) return resConstructor, nil }