Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clobee/customer-list-go
Playing with GO and JSON while exploring Go best practices
https://github.com/clobee/customer-list-go
channels go golang goroutine json
Last synced: about 2 months ago
JSON representation
Playing with GO and JSON while exploring Go best practices
- Host: GitHub
- URL: https://github.com/clobee/customer-list-go
- Owner: clobee
- Created: 2020-02-29T01:39:38.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T05:23:22.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T00:10:05.194Z (7 months ago)
- Topics: channels, go, golang, goroutine, json
- Language: Go
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Test
[![BCH compliance](https://bettercodehub.com/edge/badge/clobee/customer-list-go?branch=master)](https://bettercodehub.com/)
[![CircleCI](https://circleci.com/gh/clobee/customer-list-go.svg?style=svg)](https://circleci.com/gh/clobee/customer-list-go)### 1. Technical problem
We have some customer records in a text file (customers.txt) -- one customer per line, JSON lines formatted. We want to invite any customer within 100km of our Dublin office for some food and drinks on us. Write a program that will read the full list of customers and output the names and user ids of matching customers (within 100km), sorted by User ID (ascending).
You must use the first formula from this article https://en.wikipedia.org/wiki/Great-circle_distance to calculate distance.
The GPS coordinates for our office are 53.339428, -6.257664.
### Application
test the program: `make test`
run the program: `make run`