{"repo":"caarlos0/env","free":true,"listed":false,"github":"https://github.com/caarlos0/env","clone":"git clone https://github.com/caarlos0/env.git","description":"A simple, zero-dependencies library to parse environment variables into structs","language":"Go","stars":6290,"topics":["golang","environment-variables","configuration","environment","config","go","hacktoberfest"],"license":"MIT","category":"dev-tools","readme_excerpt":"A simple, zero-dependencies library to parse environment variables into structs. Installation Getting started You can see the full documentation and list of examples at pkg.go.dev. --- Used and supported by Encore – the platform for building Go-based cloud backends. Usage Caveats [!CAUTION] Unexported fields will be ignored by env . This is by design and will not change. Functions - Parse : parse the current environment into a type - ParseAs : parse the current environment into a type using generics - ParseWithOptions : parse the current environment into a type with custom options - ParseAsWithOptions : parse the current environment into a type with custom options and using generics - Must : can be used to wrap Parse. calls to panic on error - GetFieldParams : get the env parsed options for a type - GetFieldParamsWithOptions : get the env parsed options for a type with custom options Supported types Out of the box all built-in types are supported, plus a few others that are commonly used. Complete list: - bool - float32 - float64 - int16 - int32 - int64 - int8 - int - string - uint16 - uint32 - uint64 - uint8 - uint - time.Duration - time.Location - encoding.TextUnmarshaler - url.URL Pointers, slices and slices of pointers, and maps of those types are also supported. You may also add custom parsers for your types. Tags The following tags are provided: - env : sets the environment variable name and optionally takes the tag options described below - envDefault : sets the defaul","default_branch":null,"files":null,"tree":[],"storefront":"/r/caarlos0","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/caarlos0/env/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}