tmpltools

package
v0.0.0-...-02c76fb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Overview

Package tmpltools provides extensions to 'text/template' that are useful for prettyprinter formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(color bool, source string) (*template.Template, error)

Run creates a template extension with the provided color setting and then runs it with the provided template source

Types

type ExtendedTemplate

type ExtendedTemplate struct {
	Color bool
}

ExtendedTemplate provides information about extended template rendering

func (*ExtendedTemplate) New

func (tmpl *ExtendedTemplate) New(source string) (*template.Template, error)

New generates a new template.Template with the functions from the extended template

Jump to

Keyboard shortcuts

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