fstring

package
v0.1.101 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package fstring contains template format with f-string.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyExpression       = errors.New("empty expression not allowed")
	ErrArgsNotDefined        = errors.New("args not defined")
	ErrLeftBracketNotClosed  = errors.New("single '{' is not allowed")
	ErrRightBracketNotClosed = errors.New("single '}' is not allowed")
)

Functions

func Format

func Format(template string, values map[string]any) (string, error)

Format interpolates the given template with the given values by using f-string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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