learn

package
v0.0.0-...-c6bdbe1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Srv

type Srv struct {
	Store WordStore

	UI *tea.Program
	// contains filtered or unexported fields
}

Srv is service to learn words

func NewSrv

func NewSrv(s WordStore, dbg bool) (*Srv, error)

NewSrv creates a new service to learning words

func (*Srv) Run

func (srv *Srv) Run() error

Run starts CLI interface

type WordStore

type WordStore interface {
	// GetWords should return n words in score decreasing order
	GetWords(n int) (*store.Words, error)
	// Save commit current store.Word in the store
	Save(w *store.Word) error
}

WordStore is store with store.Word for learning

Jump to

Keyboard shortcuts

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