maps

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

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

Go to latest
Published: Jul 8, 2022 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")
)

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)

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