Skip to content

Latest commit

 

History

History
29 lines (28 loc) · 803 Bytes

README.md

File metadata and controls

29 lines (28 loc) · 803 Bytes

dict-cli

A simple program to call api.dictionaryapi.dev and retrieve word definitions

Build and run

go build -o dict main.go
./dict bash

Output

Word: bash
Phonetics:
  - /bæʃ/
Origin:
Meanings:
  noun:
    - Definition: A large party; gala event.
      Example: They had a big bash to celebrate their tenth anniversary.
    - Definition: An attack that consists of placing all one's weight into a downward attack with one's fists.
  verb:
    - Definition: To strike heavily.
      Example: He bashed himself against the door.
    - Definition: To collide.
      Example: Don't bash into me with that shopping trolley.
    - Definition: To criticize harshly.
      Example: He bashed my ideas.
    - Definition: To masturbate.
      Example: He said that he bashes daily.