Versions in this module Expand all Collapse all v1 v1.1.0 Sep 18, 2016 Changes in this version + var ErrReadByteFailed = errors.New("interpol: read byte failed") + type Interpolator struct + func New(opts ...Option) *Interpolator + func NewWithOptions(opts *Options) *Interpolator + func (i *Interpolator) Interpolate() error + type Option func(OptionSetter) + func WithFormat(format Func) Option + func WithOutput(output io.Writer) Option + func WithTemplate(template io.Reader) Option + type OptionSetter interface + SetFormat func(format Func) + SetOutput func(output io.Writer) + SetTemplate func(template io.Reader) + type Options struct + Format Func + Output io.Writer + Template io.Reader v1.0.0 Jul 5, 2016 Changes in this version + var ErrExpectingClose = errors.New("interpol: expecting close in template") + var ErrKeyNotFound = errors.New("interpol: key not found") + var ErrUnexpectedClose = errors.New("interpol: unexpected close in template") + func WithFunc(template string, format Func) (string, error) + func WithMap(template string, m map[string]string) (string, error) + type Func func(key string, w io.Writer) error