dictionary

package
v0.0.0-...-0ef9f9d Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: MIT Imports: 0 Imported by: 0

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

type Dictionary map[string]string

func (Dictionary) Add

func (d Dictionary) Add(word, definition string) error

func (Dictionary) Delete

func (d Dictionary) Delete(word string) error

func (Dictionary) Search

func (d Dictionary) Search(word string) (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

Jump to

Keyboard shortcuts

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