Categorygithub.com/BUGLAN/kit
repository
0.1.7
Repository: https://github.com/buglan/kit.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

kit

a golang kit tools

Example

  • minimum example
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
package main

func main() {

}