skabelon

package module
v0.0.0-...-d0e1506 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2017 License: MIT Imports: 3 Imported by: 0

README

SKABELON

Simple tool for preprocessing files with environment variables. May be useful for Docker containers run scripts for config files preprocessing.

Currently uses all available environment variables.

Usage:

$ ENV_VAR=value1 skabelon input.envtmpl output.conf

For input file like this

The variable $ENV_VAR is {{ .ENV_VAR }} and $SHELL is {{ .SHELL }}

Will be produced output

The variable $ENV_VAR is value1 and $SHELL is /bin/bash

IMPROVEMENTS

[x] Simple file processing

[ ] stdin to stdout processing

[ ] multiple file processing

[ ] multiple template support, nested templates

[ ] variables overrdiding and filtering

Documentation

Overview

Package skabelon implements total templating functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Skabelon

type Skabelon struct {
	// contains filtered or unexported fields
}

func New

func New() *Skabelon

func (*Skabelon) Exec

func (instance *Skabelon) Exec(file *os.File) error

func (*Skabelon) Get

func (instance *Skabelon) Get(key string) (string, bool)

func (*Skabelon) Parse

func (instance *Skabelon) Parse(name, tmpl string) error

func (*Skabelon) Set

func (instance *Skabelon) Set(key, value string)

func (*Skabelon) SetOptions

func (instance *Skabelon) SetOptions(options []string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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