modulepackage
0.0.0-20240921144511-23b648da4366
Repository: https://github.com/yinyin/go-interpolatetext.git
Documentation: pkg.go.dev
# Functions
ApplyTextMap interpolates given text map with given template.
NewTextMapInterpolation creates an instance of TextMapInterpolation with given template text.
NewTextMapInterpolationSlice creates an instance of TextMapInterpolationSlice.
# Variables
ErrBraceNotClose represents an opened interpolate brace is not closed as expect.
ErrCannotConvertDataIntoTextMap raises when given interpolate data cannot be convert into text map.
# Structs
ErrEmptyInterpolateArgument represents error discovered on parsing template string where an empty interpolate (eg `${}`) is given.
ErrInterpolateArgumentParseFailed represents error occurs in parsing interpolate argument.
TextMapInterpolation is a instance of text-mapping based interpolation template.
# Type aliases
ErrTextMapInterpolateKeyNotFound raises when given interpolate key cannot be mapped in given text map.
TextMapInterpolationSlice is a slice of TextMapInterpolation to ease interpolation on list of strings.