expvar

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 3 Imported by: 31

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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