support docstrings

This commit is contained in:
Michael McLoughlin
2018-12-27 23:01:27 -08:00
parent 023324a4ec
commit 9f5277bf8e
6 changed files with 38 additions and 5 deletions

View File

@@ -51,6 +51,10 @@ func (c *Context) Function(name string) {
c.file.AddSection(c.function)
}
func (c *Context) Doc(lines ...string) {
c.activefunc().Doc = lines
}
func (c *Context) Signature(s *gotypes.Signature) {
c.activefunc().SetSignature(s)
}