word

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package word handles checking words in the game.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

type Validator map[string]struct{}

Validator determines if words are valid.

func NewValidator

func NewValidator(r io.Reader) (*Validator, error)

NewValidator consumes the lower case words in the reader to use for validating.

func (Validator) Validate

func (v Validator) Validate(word string) bool

Validate determines whether or not the word is valid. Words are converted to lowercase before checking.

Jump to

Keyboard shortcuts

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