package helptest

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

Index

Types

type HelperContext

type HelperContext struct {
	context.Context

	BlockFn        func() (string, error)
	BlockContextFn func(hctx.Context) (string, error)
	RenderFn       func(string) (string, error)
	// contains filtered or unexported fields
}

func NewContext

func NewContext() *HelperContext

func (HelperContext) Block

func (f HelperContext) Block() (string, error)

func (HelperContext) BlockWith

func (f HelperContext) BlockWith(c hctx.Context) (string, error)

func (HelperContext) Data

func (f HelperContext) Data() sync.Map

func (HelperContext) Has

func (c HelperContext) Has(key string) bool

Has checks the existence of the key in the context.

func (HelperContext) HasBlock

func (f HelperContext) HasBlock() bool

func (HelperContext) New

func (f HelperContext) New() hctx.Context

func (HelperContext) Render

func (f HelperContext) Render(s string) (string, error)

func (*HelperContext) Set

func (f *HelperContext) Set(key string, value interface{})

func (*HelperContext) Update

func (f *HelperContext) Update(key string, value interface{}) (returnData bool)

func (HelperContext) Value

func (f HelperContext) Value(key interface{}) interface{}

Source Files

context.go

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

Tools for package owners.