docxtemplate

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package docxtemplate validates and renders DOCX templates containing {{placeholder}} values. A placeholder may span several Word text runs, but must remain inside one paragraph.

Index

Constants

View Source
const (
	MaxFileSize = 10 * 1024 * 1024
)

Variables

This section is empty.

Functions

func Render

func Render(content []byte, values map[string]string) ([]byte, error)

Render validates content against the supplied value keys and replaces all placeholders. Map keys include braces, for example {{contract.number}}.

func Validate

func Validate(content []byte, supported []string) error

Validate checks DOCX structure, decompression limits, XML and placeholders.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL