Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 808 Bytes

README.md

File metadata and controls

50 lines (36 loc) · 808 Bytes

Kio

Kio (Keep It Organized - inspired to Boilr) let manage simple template creation logic

  • Prepare your input file (with logic)
  • (Go Template) Magic
  • Profit!

Why

Because i need i simple template creation tool that follow a simple logic.

Installation

$ go get github.com/r3vit/kio/kio

Template logic

Choice between n-options:

{{ choose "referenceName" "option1" "option2" "..." "optionN"}}

Show (yes/no):

    {{ if isset "referenceName"}}
        //show if referenceName is set (0 or 1)
    {{ end }}

Custom:

{{ custom "referenceName" }}

Code

Simply (main.go):

package main

import "github.com/r3vit/kio/kio"

func main() {
	newTemplate := kio.NewKio("example", "input.yml", "output.txt")
	newTemplate.Execute()
}