mirror of https://github.com/golang/go.git
runtime: remove unused getenv function
Change-Id: I49cda99f81b754e25fad1483de373f7d07d64808 Reviewed-on: https://go-review.googlesource.com/6452 Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
8012a2e9c9
commit
dac3f486ac
|
|
@ -6,15 +6,6 @@ package runtime
|
|||
|
||||
import "unsafe"
|
||||
|
||||
func getenv(s *byte) *byte {
|
||||
val := gogetenv(gostringnocopy(s))
|
||||
if val == "" {
|
||||
return nil
|
||||
}
|
||||
// Strings found in environment are NUL-terminated.
|
||||
return &bytes(val)[0]
|
||||
}
|
||||
|
||||
var tracebackbuf [128]byte
|
||||
|
||||
func gogetenv(key string) string {
|
||||
|
|
|
|||
|
|
@ -8,15 +8,6 @@ package runtime
|
|||
|
||||
import "unsafe"
|
||||
|
||||
func getenv(s *byte) *byte {
|
||||
val := gogetenv(gostringnocopy(s))
|
||||
if val == "" {
|
||||
return nil
|
||||
}
|
||||
// Strings found in environment are NUL-terminated.
|
||||
return &bytes(val)[0]
|
||||
}
|
||||
|
||||
func gogetenv(key string) string {
|
||||
env := environ()
|
||||
if env == nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue