Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bygui86/go-timeouts
- Owner: bygui86
- License: apache-2.0
- Created: 2019-09-05T16:14:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-30T14:17:31.000Z (about 5 years ago)
- Last Synced: 2024-11-08T06:07:50.893Z (about 2 months ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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