ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - s0rg/fantasyname: RinkWorks fantasy name generator for golang
RinkWorks fantasy name generator for golang. Contribute to s0rg/fantasyname development by creating an account on GitHub.
Visit Site

GitHub - s0rg/fantasyname: RinkWorks fantasy name generator for golang

GitHub - s0rg/fantasyname: RinkWorks fantasy name generator for golang

PkgGoDev License Go Version Tag Mentioned in Awesome Go

CI Go Report Card Maintainability Test Coverage Issues

fantasyname

This is a golang implementation of name generator described at RinkWorks, its based on https://github.com/skeeto/fantasyname code.

example

How it looks like:

import (
    "fmt"
    "log"
    "time"
    "math/rand"

    fn "github.com/s0rg/fantasyname"
)

func main() {
    rand.Seed(time.Now().UnixNano())

    gen, err := fn.Compile("sV'i", fn.Collapse(true), fn.RandFn(rand.Intn))
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(gen.String()) // will print something like: entheu'loaf
}

Here is a full example.

You can run it with go run _example/main.go to see results.

pattern syntax

The letters s, v, V, c, B, C, i, m, M, D, and d represent different types of random replacements:

  • s - generic syllable
  • v - vowel
  • V - vowel or vowel combination
  • c - consonant
  • B - consonant or consonant combination suitable for beginning a word
  • C - consonant or consonant combination suitable anywhere in a word
  • i - insult
  • m - mushy name
  • M - mushy name ending
  • D - consonant suited for a stupid person's name
  • d - syllable suited for a stupid person's name (begins with a vowel)

Everything else is emitted literally.

All characters between parenthesis () are emitted literally. For example, the pattern s(dim), emits a random generic syllable followed by dim.

Characters between angle brackets <> emit patterns from the table above. Imagine the entire pattern is wrapped in one of these.

In both types of groupings, a vertical bar | denotes a random choice. Empty groups are allowed. For example, (foo|bar) emits either foo or bar. The pattern <c|v|> emits a constant, vowel, or nothing at all.

An exclamation point ! means to capitalize the component that follows it. For example, !(foo) will emit Foo and v!s will emit a lowercase vowel followed by a capitalized syllable, like eRod.

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory