1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
12 extern Slice
runtime_get_envs(void);
15 runtime_getenv(const char *s
)
26 len
= runtime_findnull(bs
);
27 envs
= runtime_get_envs();
28 envv
= (String
*)envs
.__values
;
30 for(i
=0; i
<envc
; i
++){
31 if(envv
[i
].len
<= len
)
33 v
= (const byte
*)envv
[i
].str
;
40 ret
.len
= envv
[i
].len
-len
-1;