From 57ae2e7371de9c7c5c2f6314baf95ca8b94a61d8 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Mon, 17 Dec 2012 23:37:02 +0800 Subject: [PATCH] =?utf8?q?os:=20fix=20docs=20for=20Expand=20there=20is=20n?= =?utf8?q?o=20concept=20of=20=E2=80=9Cundefined=E2=80=9D=20variables=20for?= =?utf8?q?=20Expand=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6946063 --- src/pkg/os/env.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/os/env.go b/src/pkg/os/env.go index eb265f2413..db7fc72b8a 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. -- 2.48.1