go-sarah: github.com/oklahomer/go-sarah/examples/simple/plugins/todo Index | Files

package todo

import "github.com/oklahomer/go-sarah/examples/simple/plugins/todo"

Package todo is an example of stateful command that let users input required arguments step by step in a conversational manner.

On each valid input, given argument is stashed to *args. *args is passed around until all required arguments are filled.

Index

Package Files

command.go

func BuildCommand Uses

func BuildCommand(storage *DummyStorage) sarah.Command

BuildCommand builds todo command with given storage.

type DummyStorage Uses

type DummyStorage struct {
}

DummyStorage is an empty struct that represents a permanent storage.

func (*DummyStorage) Save Uses

func (s *DummyStorage) Save(senderKey string, description string, due time.Time)

Save saves given todo settings to permanent storage.

Package todo imports 8 packages (graph). Updated 2020-09-27. Refresh now. Tools for package owners.