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
11 extern Slice
runtime_get_envs(void);
14 runtime_getenv(const char *s
)
25 len
= runtime_findnull(bs
);
26 envs
= runtime_get_envs();
27 envv
= (String
*)envs
.__values
;
29 for(i
=0; i
<envc
; i
++){
30 if(envv
[i
].len
<= len
)
32 v
= (const byte
*)envv
[i
].str
;
39 ret
.len
= envv
[i
].len
-len
-1;