Skip to content

A expvar handler for gin framework, expvar provides a standardized interface to public variables.

License

Notifications You must be signed in to change notification settings

gin-contrib/expvar

Repository files navigation

expvar

Run Tests codecov Go Report Card GoDoc

A expvar handler for gin framework, expvar provides a standardized interface to public variables.

Usage

Start using it

Download and install it:

go get github.com/gin-contrib/expvar

Import it in your code:

import "github.com/gin-contrib/expvar"

Canonical example

package main

import (
  "log"

  "github.com/gin-contrib/expvar"
  "github.com/gin-gonic/gin"
)

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

  r.GET("/debug/vars", expvar.Handler())

  if err := r.Run(":8080"); err != nil {
    log.Fatal(err)
  }
}

About

A expvar handler for gin framework, expvar provides a standardized interface to public variables.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages