xpand

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 8 Imported by: 0

README

xpand - A tiny text/template expander

Go Reference test codecov

Installation

go get github.com/m0t0k1ch1-go/xpand

Documentation

Index

Constants

View Source
const (
	DefaultLeftDelim  = "{{"
	DefaultRightDelim = "}}"
)

Variables

This section is empty.

Functions

func File

func File(ctx context.Context, path string, opts ...Option) ([]byte, error)

File reads the file at path, expands it as a text/template, and returns the result.

Types

type Option

type Option func(*options)

Option configures the expansion.

func WithDelims

func WithDelims(left, right string) Option

WithDelims sets the action delimiters. Empty values stand for the defaults.

Jump to

Keyboard shortcuts

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