manifest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Msg      string
	HelpText string
}

func (*Base) Help

func (p *Base) Help() string

type Generator

type Generator struct {
	Help    string    `toml:"help"`
	Ignore  []string  `toml:"ignore"`
	Prompts PromptMap `toml:"prompts"`
}

func NewGenerator

func NewGenerator() *Generator

func ReadToml

func ReadToml(b []byte) (*Generator, error)

func (*Generator) PromptAll

func (g *Generator) PromptAll(prompter Prompter) (map[string]interface{}, error)

type Prompt

type Prompt interface {
	Help() string
	Prompt(prompter Prompter) (interface{}, error)
	// contains filtered or unexported methods
}

type PromptMap

type PromptMap map[string]Prompt

func (PromptMap) String

func (m PromptMap) String() string

func (PromptMap) UnmarshalTOML

func (m PromptMap) UnmarshalTOML(data interface{}) error

type Prompter

type Prompter interface {
	Get(message, help string, validator func(val string) error) (string, error)
	SelectOne(message, help string, options []string) (string, error)
	SelectMultiple(message, help string, options []string) ([]string, error)
	Confirm(message, help string) (bool, error)
}

Jump to

Keyboard shortcuts

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