template

package
v1.1.0-alpha7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: GPL-3.0 Imports: 7 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ID

func ID(s string) string

func Id

func Id(s string) string

func LeftLower

func LeftLower(s string) string

func LeftUpper

func LeftUpper(s string) string

func ParseTemplateFileToBytes

func ParseTemplateFileToBytes(inputFilePath string, params any, opts ...ParseTemplateOption) ([]byte, error)

func ParseTemplateFileToFile

func ParseTemplateFileToFile(inputFilePath string, outputFilePath string, params any, opts ...ParseTemplateOption) error

func ParseTemplateFileToString

func ParseTemplateFileToString(inputFilePath string, params any, opts ...ParseTemplateOption) (string, error)

func ParseTemplateStringToBytes

func ParseTemplateStringToBytes(inputStr string, params any, opts ...ParseTemplateOption) ([]byte, error)

func ParseTemplateStringToString

func ParseTemplateStringToString(inputStr string, params any, opts ...ParseTemplateOption) (string, error)

func ParseTemplatesDir

func ParseTemplatesDir(templateDir string, outputDir string, params any, opts ...ParseTemplateOption) error

func Plural

func Plural(s string) string

func SnakeCase

func SnakeCase(s string) string

func UpperShort

func UpperShort(s string) string

Types

type ParseTemplateOption

type ParseTemplateOption func(tpl *template.Template)

func WithDelim

func WithDelim(leftDelim string, rightDelim string) ParseTemplateOption

Jump to

Keyboard shortcuts

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