expvar

package
v0.0.0-...-a0b1be5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: MIT, MIT Imports: 3 Imported by: 0

README

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)
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() gin.HandlerFunc

Handler for gin framework

Types

This section is empty.

Source Files

  • expvar.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL