package encoders

import "github.com/gobuffalo/plush/v5/helpers/encoders"

Index

Constants

const (
	ToJSONKey = "toJSON"
	RawKey    = "raw"
)

Keys to be used in templates for the functions in this package.

Functions

func New

func New() hctx.Map

New returns a map of the helpers within this package.

func Raw

func Raw(s string) template.HTML

Raw converts a `string` to a `template.HTML`

func ToJSON

func ToJSON(v interface{}) (template.HTML, error)

ToJSON marshals the interface{} and returns it as template.HTML

Source Files

encoders.go json.go raw.go

Version
v5.0.5 (latest)
Published
May 23, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
2 weeks ago

Tools for package owners.