lorelai

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Provides Random Lorem Ipsum, and other utilities.

Index

Constants

This section is empty.

Variables

View Source
var DATA [1100]string = [1100]string{} /* 1100 elements not displayed */

A lot of Lorem Ipsum Words.

View Source
var TLDS = []string{

	"com",
	"net",
	"org",
	"fr",
	"de",
	"uk",
	"cn",
	"ru",
	"br",
	"in",
	"jp",
	"ca",
	"us",
	"it",
	"au",
	"es",
	"nl",
	"se",
	"mx",
	"ch",
	"pl",
	"ar",
	"be",
	"no",
	"at",
	"dk",
	"fi",
	"pe",

	"io",
	"co",
	"ai",
	"tv",
	"me",
	"app",
	"dev",
	"xyz",
	"biz",
	"pro",
}

Functions

func ClassicParagraph

func ClassicParagraph() string

ClassicParagraph returns the classic Lorem Ipsum paragraph that starts with "Lorem ipsum dolor sit amet, consectetur adipiscing elit..."

func ClassicSentence

func ClassicSentence() string

ClassicSentence returns a sentence from the classic Lorem Ipsum text

func ClassicWords

func ClassicWords(quantity int) string

ClassicWords returns the specified number of words from the classic Lorem Ipsum text

func ClassicWordsPerParagraph added in v1.3.2

func ClassicWordsPerParagraph() int

ClassicWordsPerSentence returns the word count per praragraph

func ClassicWordsPerSentence added in v1.3.2

func ClassicWordsPerSentence() int

ClassicWordsPerSentence returns the word count per sentence

func Domain

func Domain() string

Get a random Domain

func Email

func Email() string

Get a random email

func FormattedLoremWords

func FormattedLoremWords(quantity int) string

Get [quantity] words, the first word is capitalized, ends with a dot.

func LoremWords

func LoremWords(quantity int) string

Get [quantity] words

func Paragraph

func Paragraph() string

Get a paragraph, with the first word capitalized, of forty five words that ends with a dot.

func Sentence

func Sentence() string

Get a sentence, with the first word capitalized, of eight words that ends with a dot.

func Title

func Title() string

func URL

func URL() string

Get a random URL

func Word

func Word() string

Get a single word

Types

type Lorem added in v1.3.3

type Lorem struct {
	Text       string
	Paragraphs int
	Sentences  int
	WordCount  int
}

Lorem represents generated Lorem Ipsum text with metadata

func ClassicGenerate added in v1.3.3

func ClassicGenerate(paragraphs int, sentences int) Lorem

ClassicGenerate creates classic Lorem Ipsum text with specified paragraphs and sentences. Each paragraph contains exactly 'sentences' sentences. Each sentence contains 8 words from the classic Lorem Ipsum text.

Example: ClassicGenerate(3, 5) creates 3 paragraphs, each with 5 sentences.

This differs from the CLI behavior where -p and -s are additive.

func Generate added in v1.3.3

func Generate(paragraphs int, sentences int) Lorem

Generate creates Lorem Ipsum text with specified paragraphs and sentences. Each paragraph contains exactly 'sentences' sentences. Each sentence contains 8 random words.

Example: Generate(3, 5) creates 3 paragraphs, each with 5 sentences.

This differs from the CLI behavior where -p and -s are additive.

Jump to

Keyboard shortcuts

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