Skip to content

Commit

Permalink
Merge pull request #10 from Depado/documentation
Browse files Browse the repository at this point in the history
Documentation in README.md
  • Loading branch information
zsais authored Aug 30, 2017
2 parents 49fc803 + c2fc301 commit 56be485
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# go-gin-prometheus
===
[![](https://godoc.org/github.com/zsais/go-gin-prometheus?status.svg)](https://godoc.org/github.com/zsais/go-gin-prometheus) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Gin Web Framework Prometheus metrics exporter

## Installation

`$ go get github.com/zsais/go-gin-prometheus`

## Usage

```go
package main

import (
"github.com/gin-gonic/gin"
"github.com/zsais/go-gin-prometheus"
)

func main() {
r := gin.New()

p := ginprometheus.NewPrometheus("gin")
p.Use(r)

r.GET("/", func(c *gin.Context) {
c.JSON(200, "Hello world!")
})

r.Run(":29090")
}
```

See the [example.go file](https://github.com/zsais/go-gin-prometheus/blob/master/example/example.go)

0 comments on commit 56be485

Please sign in to comment.