Documentation ¶
Overview ¶
Package cetak helps you generate Word document (.docx) from a template.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docx ¶
type Docx interface { Generate(data interface{}, destination string) error Template() *template.Template SetTemplate(tpl *template.Template) }
Docx is the interface used to interact with cetak's doc generator
Generate generates the document using given data. Generate receive data which can be any type that is accepted by text/template package. Generate also receive destination path which is the intended path to write the result. You can also get the generated template and modify it accordingly using the provided getter and setter (Template and SetTemplate)
Click to show internal directories.
Click to hide internal directories.