helper

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: MIT Imports: 17 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 NoteFromFile added in v1.0.0

func NoteFromFile(filePath string) (store.Note, error)

func PrepareToRun

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

func RenderTable

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

func SearchCriteriaInNoteView added in v1.1.0

func SearchCriteriaInNoteView(notes []store.NoteView, f func(n store.NoteView) bool) bool

func SetsFromDir

func SetsFromDir(path string) ([]store.Note, 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