https://github.com/buglan/kit
golang util package
https://github.com/buglan/kit
Last synced: 5 months ago
JSON representation
golang util package
- Host: GitHub
- URL: https://github.com/buglan/kit
- Owner: BUGLAN
- Created: 2020-05-31T13:35:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-31T11:16:09.000Z (over 5 years ago)
- Last Synced: 2025-11-22T14:51:57.472Z (7 months ago)
- Language: Go
- Size: 174 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kit
> a golang kit tools
## Example
* minimum example
```go
package main
import (
"github.com/BUGLAN/kit/ms"
"github.com/gin-gonic/gin"
"net/http"
)
func main() {
srv := ms.NewMicroService(
ms.WithGin(handler).WithPrometheus().Listen(5000),
)
srv.Start()
}
func handler(engine *gin.Engine) {
engine.GET("/ping", func(ctx *gin.Context) {
ctx.JSON(http.StatusOK, gin.H{
"message": "pong",
})
})
}
```
* http restful
```go
package main
func main() {
}
```