]> Cypherpunks repositories - gostls13.git/commitdiff
os: reference LookupEnv from the Getenv docs
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 18 Aug 2016 05:26:51 +0000 (05:26 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 19 Aug 2016 00:30:37 +0000 (00:30 +0000)
Fixes #16782

Change-Id: If54917bf5ca1588d8a6d443c3aa6e1d4ada6b620
Reviewed-on: https://go-review.googlesource.com/27322
Reviewed-by: anatoly techtonik <techtonik@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/os/env.go

index 4a147144c3edf5fde33e03742130ea375c961898..aa83ee3a97c99df8a8f97662d17ad0389cffde3e 100644 (file)
@@ -76,6 +76,7 @@ func getShellName(s string) (string, int) {
 
 // Getenv retrieves the value of the environment variable named by the key.
 // It returns the value, which will be empty if the variable is not present.
+// To distinguish between an empty value and an unset value, use LookupEnv.
 func Getenv(key string) string {
        v, _ := syscall.Getenv(key)
        return v