mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
runtime: implement environment variables for Linux
This commit is contained in:
committed by
Ron Evans
parent
768a15c1dd
commit
c47cdfa66f
Vendored
+3
-3
@@ -5,10 +5,10 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
println(os.Getenv("ENV1"))
|
||||
println("ENV1:", os.Getenv("ENV1"))
|
||||
v, ok := os.LookupEnv("ENV2")
|
||||
if !ok {
|
||||
panic("ENV2 not found")
|
||||
println("ENV2 not found")
|
||||
}
|
||||
println(v)
|
||||
println("ENV2:", v)
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -1,2 +1,2 @@
|
||||
VALUE1
|
||||
VALUE2
|
||||
ENV1: VALUE1
|
||||
ENV2: VALUE2
|
||||
|
||||
Reference in New Issue
Block a user