---
title: "Discussion on \"Go cheatsheet - Env\" | Hashnode"
description: "Discussion on \"Go cheatsheet - Env\". Env\nFunctions to operate environment variables:\n\nos.Getenv: get env variable by name, if not set, return empty string\nos.LookupEnv: return (value, exists)\nos.Setenv: set env variable value\nos.Unsetenv: Unset env variable\n\nSample code:\npackage main\n\ni..."
url: "https://hashnode.com/posts/go-cheatsheet-env/607e4f50c99e200d08f7fab4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Go cheatsheet - Env](https://hn.0xbf.me/go-cheatsheet-env?utm_source=hashnode&utm_medium=feed)

Env Functions to operate environment variables: os.Getenv: get env variable by name, if not set, return empty string os.LookupEnv: return (value, exists) os.Setenv: set env variable value os.Unsetenv: Unset env variable Sample code: package main i...

Apr 20, 2021 · 1 min read · hn.0xbf.me  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[0xBF](https://hashnode.com/@0xbf)

@0xbf

  
[View profile](https://hashnode.com/@0xbf)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
