Golang : Get environment variable

Sometimes we need to get the environment variables for performing next task in our program. It is straight forward to do this in Go.

For example, to get the environment variable HOME.

 Home := os.Getenv("HOME")

By Adam Ng

IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.