mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-10 10:23:19 +08:00
feat: chage template name (due2 #17)
This commit is contained in:
13
docx.go
13
docx.go
@@ -55,10 +55,10 @@ type Docx struct {
|
||||
io.WriterTo
|
||||
}
|
||||
|
||||
// NewA4 generates a new empty A4 docx file that we can manipulate and
|
||||
// New generates a new empty docx file that we can manipulate and
|
||||
// later on, save
|
||||
func NewA4() *Docx {
|
||||
return newEmptyA4File()
|
||||
func New() *Docx {
|
||||
return newEmptyFile()
|
||||
}
|
||||
|
||||
// Parse generates a new docx file in memory from a reader
|
||||
@@ -160,10 +160,3 @@ func (f *Docx) WriteTo(writer io.Writer) (_ int64, err error) {
|
||||
func (f *Docx) Read(_ []byte) (int, error) {
|
||||
return 0, os.ErrInvalid
|
||||
}
|
||||
|
||||
// UseTemplate will replace template files
|
||||
func (f *Docx) UseTemplate(template string, tmpfslst []string, tmplfs fs.FS) {
|
||||
f.template = template
|
||||
f.tmplfs = tmplfs
|
||||
f.tmpfslst = tmpfslst
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user