render

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeSelect   = "select"
	TypeInput    = "input"
	TypeTextArea = "textarea"
)

Variables

This section is empty.

Functions

func ArrayInGroupsOf added in v1.3.0

func ArrayInGroupsOf(fields []huh.Field, num int) []*huh.Group

func NewMissingErr

func NewMissingErr(field string) error

func NotBlankValidator

func NotBlankValidator(name string) func(s string) error

NotBlankValidator is a verification function that checks whether the input is empty

Types

type Item

type Item struct {
	Name     string
	Desc     string
	Type     string
	Options  []Option
	Required bool
}

type MissingErr

type MissingErr struct {
	// contains filtered or unexported fields
}

func (MissingErr) Error

func (e MissingErr) Error() string

type Option

type Option struct {
	Name string
	Desc string
}

func (*Option) String

func (o *Option) String() string

type Template

type Template struct {
	Name    string
	Desc    string
	Format  string
	Default bool
	Items   []*Item
	// contains filtered or unexported fields
}

func NewTemplate

func NewTemplate() (*Template, error)

func (*Template) Run

func (t *Template) Run() ([]byte, error)

Jump to

Keyboard shortcuts

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