mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-04 16:50:57 +00:00
21 lines
506 B
Go
21 lines
506 B
Go
// Copyright 2012 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
|
|
|
|
package runtime
|
|
|
|
func gogetenv(key string) string {
|
|
env := environ()
|
|
if env == nil {
|
|
throw("getenv before env init")
|
|
}
|
|
for _, s := range env {
|
|
if len(s) > len(key) && s[len(key)] == '=' && s[:len(key)] == key {
|
|
return s[len(key)+1:]
|
|
}
|
|
}
|
|
return ""
|
|
}
|