envexpvar

package module
v0.0.0-...-ed8fcaa Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

README

envexpvar

Expose Process Environment via expvar in Go.

GoDocCircleCI

Usage:

In your go code simply:

import _ "github.com/bakins/envexpvar"

And environments variables will be exposed using expvar. Generally these are exposed on an http endpoint. See the docs for expvar

An extremely simple example is included in bin/example/example.go. Run this:

cd bin/example
go run example.go

And then request /debug/vars on port 8080 and you will see "environment" included.

$ curl http://localhost:8080/debug/vars
{
"cmdline": ["/var/folders/zs/9j117pqx0c91dy_djv0pk5pc0000gn/T/go-build911455735/command-line-arguments/_obj/exe/example"],
"environment": {"
...

LICENSE

See LICENSE

Documentation

Overview

Package envexpvar exposes process environmental variables via expvar

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Env

func Env() map[string]string

Env returns the current OS environment for this running process.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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