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.
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
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.