Categorygithub.com/adammck/venv
modulepackage
0.0.0-20200610172036-e77789703e7c
Repository: https://github.com/adammck/venv.git
Documentation: pkg.go.dev

# README

venv

GoDoc Build Status

This is a Go library to abstract access to environment variables.
Like spf13/afero or blang/vfs, but for the env.

Usage

package main

import (
	"fmt"
	"github.com/adammck/venv"
)

func main() {
	var e venv.Env

	// Use the real environment

	e = venv.OS()
	fmt.Printf("Hello, %s!\n", e.Getenv("USER"))

	// Or use a mock

	e = venv.Mock()
	e.Setenv("USER", "fred")
	fmt.Printf("Hello, %s!\n", e.Getenv("USER"))
}

License

MIT.

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author