https://github.com/thoughtworks/runes
Building the `runes` command with TDD in Go.
https://github.com/thoughtworks/runes
command-line emoji golang tdd unicode
Last synced: about 1 year ago
JSON representation
Building the `runes` command with TDD in Go.
- Host: GitHub
- URL: https://github.com/thoughtworks/runes
- Owner: thoughtworks
- License: mit
- Created: 2017-02-17T08:09:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-10-01T07:07:56.000Z (over 6 years ago)
- Last Synced: 2024-06-20T06:21:58.112Z (almost 2 years ago)
- Topics: command-line, emoji, golang, tdd, unicode
- Language: Go
- Homepage:
- Size: 38.1 KB
- Stars: 18
- Watchers: 27
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Runes: baby steps with TDD in Go
In this repo you can follow the step-by-step development of `runes` a command-line utility to find Unicode characters by name.
Each step in is documented explaining the Go language features used in the tests and application code. We follow the TDD _(Test Driven Design)_ method, so we code a test and then implement the functionality being tested. This makes it easier to focus on the __what__ (the API) before we think about the __how__ (the implementation).
You don't need to know Go to follow along. The only pre-requsite is to know programming some language.
## Our goal
At the end of this tutorial, we'll have a command-line too which allows searching for Unicode characters, like emoji, by typing words that appear in the character name. For example:
```
$ runes face eyes
U+1F601 😁 GRINNING FACE WITH SMILING EYES
U+1F604 😄 SMILING FACE WITH OPEN MOUTH AND SMILING EYES
U+1F606 😆 SMILING FACE WITH OPEN MOUTH AND TIGHTLY-CLOSED EYES
U+1F60A 😊 SMILING FACE WITH SMILING EYES
U+1F60D 😍 SMILING FACE WITH HEART-SHAPED EYES
U+1F619 😙 KISSING FACE WITH SMILING EYES
U+1F61A 😚 KISSING FACE WITH CLOSED EYES
U+1F61D 😝 FACE WITH STUCK-OUT TONGUE AND TIGHTLY-CLOSED EYES
U+1F638 😸 GRINNING CAT FACE WITH SMILING EYES
U+1F63B 😻 SMILING CAT FACE WITH HEART-SHAPED EYES
U+1F63D 😽 KISSING CAT FACE WITH CLOSED EYES
U+1F644 🙄 FACE WITH ROLLING EYES
```
Give the `runes` command one or more words, and it returns a sorted list of Unicode characters containing those words in their names.
To get started, go to the [project page](https://thoughtworks.github.io/runes/) (docs in Portuguese for now; will be translated to English by Oct 5, 2019).
## Credits
This tutorial is based on the `charfinder` example from chapter 18 of [Fluent Python](http://shop.oreilly.com/product/0636920032519.do), by Luciano Ramalho. The Go version called `runefinder` was started in the [Garoa Gophers](https://garoa.net.br/wiki/Garoa_Gophers) study group: Afonso Coutinho (@afonso), Alexandre Souza (@alexandre), Andrews Medina (@andrewsmedina), João "JC" Martins (@jcmartins), Luciano Ramalho (@ramalho), Marcio Ribeiro (@mmr) and Michael Howard.