jsontransform

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 5 Imported by: 0

README

JSONTransform

Go Reference

Use JSON data to render a template.

Install

go get github.com/plan97/jsontransform/cmd/jsontransform

Usage

After installing, run the following to check on usage.

jsontransform --help

Documentation

Overview

Package jsontransform provides parsers and renderers using JSON data.

Parsed templates can make use of functions from https://github.com/Masterminds/sprig.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTemplate

func ParseTemplate(name, template string) (*t.Template, error)

ParseTemplate creates a new template parser with the input name and template and adds functions from https://github.com/Masterminds/sprig.

func RenderTemplate

func RenderTemplate(tmpl *t.Template, name, data string, writer io.Writer) error

RenderTemplate uses the template parser with the input name to render the output using the provided data (JSON). The output will be written to the writer.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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