Sample Go Lang command line dictionary
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Go Command Line Urban Dictionary

Just a basic go command line example that find a definition of a word from Urban Dictionary API and displays the first result to the user.

url := fmt.Sprintf("", *wordPtr)


➜  go-command-line-urban-dictionary git:(master) ✗ go build .
➜  go-command-line-urban-dictionary git:(master) ✗ ./go-command-line-urban-dictionary -h
Usage of ./go-command-line-urban-dictionary:
  -word string
        a string (default "foo")

use the -word flag to pass in the word

➜  go-command-line-urban-dictionary git:(master) ✗ ./go-command-line-urban-dictionary -word=yolo
Word: YOLO
Defenition: An overused acronym for "[You only live once]." There is an [exception] for those who believe in [reincarnation] or are cats.
Example: Examples:
—I got up.
—I inhaled.
—I exhaled.
—I [took a shit].
—I [flushed] the toilet.
—I stretched.