WASI & darwin: support env variables based on libc

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2021-02-17 23:50:53 +09:00
committed by Ron Evans
parent c299386906
commit 9841ac4acd
9 changed files with 115 additions and 12 deletions
+14
View File
@@ -0,0 +1,14 @@
package main
import (
"os"
)
func main() {
println(os.Getenv("ENV1"))
v, ok := os.LookupEnv("ENV2")
if !ok {
panic("ENV2 not found")
}
println(v)
}
+2
View File
@@ -0,0 +1,2 @@
VALUE1
VALUE2