Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bygui86/go-timeouts

Go sample project to handle timeouts
https://github.com/bygui86/go-timeouts

Last synced: 2 days ago
JSON representation

Go sample project to handle timeouts

Awesome Lists containing this project

README

        

# Go sample project to handle timeouts

## Run

### JSON Server
```
cd go-timeout/
npm install -g json-server
json-server --watch db.json
curl http://localhost:3000/todos/1
> {
> "userId": 1,
> "id": 1,
> "title": "delectus aut autem",
> "completed": false
> }
```

### Example
```
go run main.go
```

---

## Links

* https://medium.com/swlh/the-simplest-way-to-handle-timeouts-in-golang-11e371dc6188
* https://jsonplaceholder.typicode.com/todos/1
* https://github.com/typicode/json-server