Skip to content

Beartime234/babble

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Babble Build Status

Babble is a small utility that generates random words for you. I found this useful because occasionally you need a random word for testing.

tower of babel

Changes

This version does not have a platform dependent way of reading words unlike the original. As it can cuase some problems when a unix system does not have /usr/shared/dict/words. So it always uses the windows version.

Usage

package your_app

import (
  "github.com/tjarratt/babble"
)

func main() {
  babbler := babble.NewBabbler()
  println(babbler.Babble()) // excessive-yak-shaving (or some other phrase)

  // optionally set your own separator
  babbler.Separator = " "
  println(babbler.Babble()) // "hello from nowhere" (or some other phrase)

  // optionally set the number of words you want
  babbler.Count = 1
  println(babbler.Babble()) // antibiomicrobrial (or some other word)

  return
})

About

A small utility to generate random words in #golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%