Implement constructors
This commit is contained in:
11
main.go
11
main.go
@@ -77,6 +77,17 @@ func main() {
|
||||
Comment: "test method",
|
||||
},
|
||||
},
|
||||
Constructors: []Constructor{
|
||||
{
|
||||
Params: []Param{},
|
||||
},
|
||||
{
|
||||
Params: []Param{
|
||||
{Name: "a", Type: "int", Comment: "test param 1"},
|
||||
{Name: "b", Type: "string", Comment: "test param 2"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
ltemplate, err := template.New("class").Funcs(fns).Parse(templatestr)
|
||||
|
||||
Reference in New Issue
Block a user