summaryrefslogtreecommitdiff
path: root/src/pkg/os/env.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/os/env.go')
-rw-r--r--src/pkg/os/env.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/os/env.go b/src/pkg/os/env.go
index eb265f241..db7fc72b8 100644
--- a/src/pkg/os/env.go
+++ b/src/pkg/os/env.go
@@ -9,7 +9,7 @@ package os
import "syscall"
// Expand replaces ${var} or $var in the string based on the mapping function.
-// Invocations of undefined variables are replaced with the empty string.
+// For example, os.ExpandEnv(s) is equivalent to os.Expand(s, os.Getenv).
func Expand(s string, mapping func(string) string) string {
buf := make([]byte, 0, 2*len(s))
// ${} is all ASCII, so bytes are fine for this operation.