funkyurl

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: MIT Imports: 7 Imported by: 0

README

funkyurl

Go package for generating funky urls or IDs like Twitch does for clips. short reddit explanation

Example outputs

SureStrongWord
HighFullProgram
ImportantRecentTime
EarlyLargeGroup

Usage

Using base list in files folder
fuo, err := funkyurl.Initialize(nil, nil)
if err != nil {
log.Fatal(err)
}
s := fuo.Generate()
Custom wordlist
adjectives := []string{"foo", "bar"}
nouns := []string{"foo", "bar"}

wordlist := funkyurl.CustomWords{
Adjectives: adjectives,
Nouns: nouns
}

options := funkyurl.FunkyOptions{
DeleteUsed: true
}

foo, err := funkyurl.Initalize(&wordlist, &options)
s := fuo.Generate()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomWords

type CustomWords struct {
	Adjectives []string `json:"adjectives"`
	Nouns      []string `json:"nouns"`
}

type FUObject

type FUObject struct {
	// contains filtered or unexported fields
}

func Initialize

func Initialize(c *CustomWords, opt *FunkyOptions) (*FUObject, error)

func (*FUObject) Generate

func (f *FUObject) Generate() string

type FunkyOptions

type FunkyOptions struct {
	DeleteUsed bool
}

Jump to

Keyboard shortcuts

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