This tutorial assumes you have:
In this article, we will know about environment variables and why to use them. And will access them in a Go application using inbuilt and third-party packages.
Environment variables are key-value pair on a system-wide level, and running processes can access that. These are often used to make the same program behave differently in different deployment environments like PROD, DEV, or TEST. Storing configuration in the environment is one of the principles of a twelve-factor app. It enables applications to be portable.
#go #environment variables #golang