Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrNotFound = DictionaryErr("could not find the word you were looking for") ErrWordExists = DictionaryErr("cannot add word because it already exists") ErrWordDoesNotExist = DictionaryErr("cannot update word because it does not exist") ErrWordCantDelete = DictionaryErr("cannot delete word because it does not exist") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dictionary ¶
func (Dictionary) Add ¶
func (d Dictionary) Add(word, definition string) error
func (Dictionary) Delete ¶
func (d Dictionary) Delete(word string) error
func (Dictionary) Update ¶
func (d Dictionary) Update(word, definition string) error
type DictionaryErr ¶
type DictionaryErr string
func (DictionaryErr) Error ¶
func (e DictionaryErr) Error() string
Click to show internal directories.
Click to hide internal directories.