This is a minimal passphrase generator based on the diceware method.
import (
"github.com/RasmusNygren/go-passphrase/passphrase"
)
// Generate a passphrase consisting of 4 words from the EffSmallShortWords wordlist
wordlist := passphrase.EffSmallShortWords()
phrase := passphrase.GeneratePhrase(wordlist, numWords)Given a text file with whitespace-seperated columns of id to word. See example Short wordlist
import (
"github.com/RasmusNygren/go-passphrase/passphrase"
)
// digits is the length of the id-numbers
wordlist := passphrase.NewWordList(path, digits)
phrase := passphrase.GeneratePhrase(wordlist, numWords)