wordler

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 7 Imported by: 0

README

WORDLER

Command Line

Usage
./wordler -h
Usage of ./wordler:
  -at {index}:{letter}
        comma-seperated {index}:{letter}, where {letter} is at {index} (0-based) of the target
  -has string
        comma-seperated strings the target contains
  -len int
        length of word
  -max int
        max output words (default 20)
  -no string
        comma-seperated strings the target does not contain
  -not-at {index}:{letter}
        comma-seperated {index}:{letter}, where {letter} is not at {index} (0-based) of the target
  -version
        display version
Example
$ ./wordler -at 2:i -not-at 1:l,4:k -has l,k -no a,e,o,u
[krill skill skirl]

Web

Usage
Usage of wordler-web:
  -bind string
        bind address (default "0.0.0.0:8080")
  -debug
        enable debug mode
  -max int
        max response length (default 1000)
  -version
        display version
Docker

Documentation

Index

Constants

View Source
const (
	VersionDefault = "dev"
	HashDefault    = "unknown"
)

Variables

View Source
var (
	WordList     [][]string
	SolutionList []string
)
View Source
var (
	Version = VersionDefault
	Hash    = HashDefault
)
View Source
var (
	ErrIndexOverflow = errors.New("index >= len(s)")
)

Functions

func DisplayVersion

func DisplayVersion()

Display version

func GetWordList

func GetWordList(l int) ([]string, error)

func ParseAt

func ParseAt(value string) (int, byte, error)

Types

type Filter

type Filter interface {
	Check(string) bool
}

type FilterAt

type FilterAt struct {
	Target byte
	Index  int
}

func (FilterAt) Check

func (f FilterAt) Check(s string) bool

type FilterContain

type FilterContain struct {
	Target string
}

func (FilterContain) Check

func (f FilterContain) Check(s string) bool

type FilterList

type FilterList []Filter

func (FilterList) Run

func (l FilterList) Run(words []string) []string

type FilterNotAt

type FilterNotAt struct {
	Target byte
	Index  int
}

func (FilterNotAt) Check

func (f FilterNotAt) Check(s string) bool

type FilterNotContain

type FilterNotContain struct {
	Target string
}

func (FilterNotContain) Check

func (f FilterNotContain) Check(s string) bool

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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