https://github.com/csalih/go-gin-example
https://github.com/csalih/go-gin-example
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/csalih/go-gin-example
- Owner: CSalih
- License: mit
- Created: 2022-09-23T07:17:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T07:49:56.000Z (over 3 years ago)
- Last Synced: 2025-12-28T20:54:13.354Z (5 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-gin-example
Example RESTful API written in Go using Gin framework.
## Getting Started
```bash
go run cmd/example-gin/main.go
```
### Get user
```bash
curl --location --request GET 'http://localhost:8080/api/v1/users/foo'
```
### Update user
```bash
curl --location --request PUT 'http://localhost:8080/api/v1/users/foo' \
--header 'Authorization: Basic bWFudToxMjM=' \
--header 'Content-Type: application/json' \
--data-raw '{
"status": "Hello World"
}'
```