helpers: Index | Files

package encoders

import ""


Package Files

encoders.go json.go raw.go


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

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

func New Uses

func New() hctx.Map

New returns a map of the helpers within this package.

func Raw Uses

func Raw(s string) template.HTML

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

func ToJSON Uses

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

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

Package encoders imports 3 packages (graph) and is imported by 1 packages. Updated 2019-04-25. Refresh now. Tools for package owners.