This package provides a YAGCL source that provides access to reading environment variables.
go get github.com/Bios-Marcel/yagcl-env
All "official" sources for YAGCL should be reported in the main repositories issue section.
Reserved characters have a concrete meaning for certain value types. Each value type can have different reserved characters. Check the documentation for the corresponding type in order to see them.
Each reserved character can be escaped via \
.
If you need a literal \
, write \\
instead.
These types support lists of 0 to N elements. If you have a fixed size array, you'll need to supply an exact amount of elements.
The elements can be of any type, as long as the type is parsable.
If your type is []string
, the elements will be conveterted into string
, if
you have an []int
, you'll have to pass only valid int
values. Values are
separated by single commas.
For example, if given:
VAR_NAME=word,12,Hello\, Chris
You would get:
["word","12","Hello, Christ"]
Reserved characters:
,
This type allows you to do a KEY=VALUE
mapping, where you can have more than
one key-value pair.
The pairs are separated by single commas. The key and the value are separated by an equal sign.
For example, if given:
VAR_NAME=a=1,b=2,weird\=key=3
You would get:
{
"a": 1,
"b": 2,
"weird=key": 3,
}
Reserved characters:
,
=