helpers

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeChars

func EscapeChars(value string) string

EscapeChars escapes characters needed for HCL

func FilterTFValue

func FilterTFValue(in *pongo2.Value, param *pongo2.Value) (*pongo2.Value, *pongo2.Error)

func MustRegisterFilter

func MustRegisterFilter(name string, filterFunc pongo2.FilterFunction)

mustRegisterFilter behaves like pongo2.RegisterFilter, but panics on an error.

func RenderGoTemplate

func RenderGoTemplate(t string, data any) (string, error)

func SerializeToHCL

func SerializeToHCL(attributeName string, data any) string

func Slugify

func Slugify(value string) string

Slugify is a custom slug function to match current python implementation

func TemplateFuncs added in v0.0.4

func TemplateFuncs() map[string]any

func VersionConstraint

func VersionConstraint(expression string) string

Types

type EmbedLoader

type EmbedLoader struct {
	Content fs.FS
}

func (*EmbedLoader) Abs

func (l *EmbedLoader) Abs(base, name string) string

func (*EmbedLoader) Get

func (l *EmbedLoader) Get(p string) (io.Reader, error)

Jump to

Keyboard shortcuts

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