Documentation ¶
Overview ¶
Package env can be used to load environment variables from files.
The following is a complete example of a file that can be parsed by this package:
# Lines beginning with "#" are comments and are skipped. # Comments are not supported at the end of lines, this # will result in a variable "Foo" with the value "Bar #Baz" Foo=Bar #Baz # Whitespace is trimmed with strings.TrimSpace. To include # spaces, wrap the value in "double quotes", or `back ticks`. # The following results in "Foo" having the value "Bar ". Foo = "Bar " # Finally, single characters may be quoted with single quotes. # If single quotes are used on something that is not a single # character they are not unwrapped and are part of the string. # The following results in "Foo" having the value "'Bar'" and # "Bar" having the value "b". Foo='Bar' Bar='b'
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Read ¶
Read loads a list of environment variables from a reader and puts them into the processes local environment.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.