Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 734 Bytes

README.md

File metadata and controls

40 lines (29 loc) · 734 Bytes

8Ball Go Package

A super simple library for getting a magic 8-ball message in a golang program offline


Why?

  1. I needed it for a thing

Usage

go get "github.com/willfantom/go-eightball"
package main

import (
	"fmt"
	"github.com/willfantom/go-eightball"
)

func main() {
	fmt.Printf("Positive: %s\n", eightball.GetPositive().Message)
	fmt.Printf("Neutral: %s\n", eightball.GetNeutral().Message)
	fmt.Printf("Negative: %s\n", eightball.GetNegative().Message)
	fmt.Printf("Random: %+v\n", eightball.GetRandom())
}

Output:

Positive: Without a doubt
Neutral: Reply hazy, try again
Negative: Don’t count on it
Random: {Message:Concentrate and ask again ResponseType:Neutral}