GitBucket
4.20.0
Toggle navigation
Sign in
Files
Branches
1
Tags
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
frozendragon
/
pokemon-go-trade
Transfer to URL with SHA
Find file
Newer
Older
tree:
b4ad2f2568
Switch branches
×
master
pokemon-go-trade
/
vendor
/
github.com
/
go-chi
/
chi
/
_examples
/ README.md
Simon Lindgren
on 12 Feb 2021
1 KB
first commit
Raw
Blame
History
chi examples
custom-handler
- Use a custom handler function signature
custom-method
- Add a custom HTTP method
fileserver
- Easily serve static files
graceful
- Graceful context signaling and server shutdown
hello-world
- Hello World!
limits
- Timeouts and Throttling
logging
- Easy structured logging for any backend
rest
- REST APIs made easy, productive and maintainable
router-walk
- Print to stdout a router's routes
todos-resource
- Struct routers/handlers, an example of another code layout style
versions
- Demo of
chi/render
subpkg
Usage
go get -v -d -u ./...
- fetch example deps
cd <example>/
ie.
cd rest/
go run *.go
- note, example services run on port 3333
Open another terminal and use curl to send some requests to your example service,
curl -v http://localhost:3333/
Read /main.go source to learn how service works and read comments for usage