template

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyPrintJSON

func PrettyPrintJSON(str string) (string, error)

func ReadFromFile

func ReadFromFile(file string) ([]byte, error)

Types

type Builder

type Builder interface {
	ParseToStdout([]byte, string) error
	ParseToFile([]byte, string, string) error
}

type JSON

type JSON struct{}

func (*JSON) ParseToFile

func (r *JSON) ParseToFile(data []byte, templatePath, file string) error

func (*JSON) ParseToStdout

func (r *JSON) ParseToStdout(data []byte, templateFile string) error

type TestBuilder

type TestBuilder struct{}

TestBuilder of type Builder interface for testing functions that require a builder interface for input

func (*TestBuilder) ParseToFile

func (r *TestBuilder) ParseToFile([]byte, string, string) error

func (*TestBuilder) ParseToStdout

func (r *TestBuilder) ParseToStdout([]byte, string) error

type YAML

type YAML struct{}

func (*YAML) ParseToFile

func (r *YAML) ParseToFile(data []byte, templatePath, file string) error

func (*YAML) ParseToStdout

func (r *YAML) ParseToStdout(data []byte, templateFile string) error

Jump to

Keyboard shortcuts

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