helper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPathRequired error = errors.New("path required")
)

Functions

func Ask

func Ask(label string) (string, error)

func AskPassword

func AskPassword(label string) (string, error)

func AskWithSuggests

func AskWithSuggests(label string, suggestions []string) (string, error)

func AskYesOrNot

func AskYesOrNot(label string) bool

func EnsureTagIsValid

func EnsureTagIsValid(tag string) bool

func LoadContentInCache

func LoadContentInCache(key, content string) (string, error)

func NewCached

func NewCached() (string, error)

func NewCachedIn

func NewCachedIn(path string) error

func PrepareToRun

func PrepareToRun(ctx context.Context, options EditorOptions) (func() error, error)

func RenderTable

func RenderTable(header table.Row, rows []table.Row)

func SetFromFile

func SetFromFile(filePath string) (data.Set, error)

func SetsFromDir

func SetsFromDir(path string) ([]data.Set, error)

Types

type EditorOptions

type EditorOptions struct {
	Editor string
	Path   string
}

Jump to

Keyboard shortcuts

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