eightball

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

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package eightball serves a random Magic 8-Ball response from the embedded dataset. The package name is "eightball" because Go identifiers cannot start with a digit; consumers should still use the slash-command label "8ball" wherever it's user-facing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(fsys fs.FS) error

Load reads datasets/8ball.txt from fsys into memory. Call once at startup. After Load returns nil, Random is safe for concurrent use.

func Random

func Random() string

Random returns a uniformly random 8-Ball response. Returns "" if Load has not been called or the dataset is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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