magic8ball

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 3 Imported by: 0

README

Magic 8 Ball

Build Status Go Report Card Docs License

Simple Magic 8 Ball package.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrResponseNotFound = errors.New("response not found")

ErrResponseNotFound is the error when a supplied 8 ball response isn't found.

Functions

func ResponseType

func ResponseType(r string) (int, error)

ResponseType returns whether a response is positive, neutral, or negative. Values returned are `1` for positive, `0` for neutral, and `-1` for negative.

func Shake

func Shake() (string, error)

Shake returns a Magic 8 Ball response. It returns an error if `crypto/rand` fails.

Types

This section is empty.

Directories

Path Synopsis
cmd
magic8ball command

Jump to

Keyboard shortcuts

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