funi

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: MIT Imports: 7 Imported by: 0

README

funi

funi is template renderer with json/yaml data.

Install

go get github.com/kawaken/funi/cmd/funi

Usage

$ echo '{"key":"value"}' | funi "key is {{.key}}"
key is value

Template syntax is from text/template.
template - The Go Programming Language

Options
$ funi -h
Usage of funi:
  -f string
    	data format 'json' or 'yaml' (default "json")
  -i string
    	input file (default STDIN)
  -o string
    	output file (default STDOUT)
  -t string
    	template file path (required)

-t is required when command line argument is nothing.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(opts Options) error

Render renders template

Types

type Options

type Options struct {
	Format         string
	InputPath      string
	OutputPath     string
	TemplatePath   []string
	TemplateString string
}

Options is option for rendering

Directories

Path Synopsis
cmd
funi command

Jump to

Keyboard shortcuts

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