templatex

package
v0.0.0-...-6cdc21d Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package templatex provides useful helper to compile and write template to file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileWrite

func CompileWrite(fs afero.Fs, fileName string, tpl *template.Template, opts ...Option) error

CompileWrite compiles template and writes result to a file.

func DoNotFormat

func DoNotFormat(o *options)

DoNotFormat disables file formatting after template compilation.

func WithoutHeader

func WithoutHeader(o *options)

WithoutHeader disables header in result file.

Types

type Option

type Option func(*options)

Option describes option.

func Data

func Data(data any) Option

Data used to pass data to template.

Jump to

Keyboard shortcuts

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