Help us shape the future of Go! Take the 2026 Go Developer Survey

fstring

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 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