env

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

README

ENV Package

The env package provides methods for working with the OS environment. Go already provides a rich set of tools for this purpose, and these methods simply add some convience.

Package Methods

Below is a reference of exported methods in this package.

Getenv(key, defaultValue string) string

Getenv takes a key name, and a default value and returns a string. If there is an environment variable in the OS with this key name then that value is returned. Otherwise the default value is returned.

Documentation

Overview

Copyright 2017 AppNinjas LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Getenv

func Getenv(key, defaultValue string) string

Getenv is a helper function to get an environment variable value, but if the value is blank will fall back to a default value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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