runtime: implement environment variables for Linux

This commit is contained in:
Ayke van Laethem
2021-04-15 23:04:05 +02:00
committed by Ron Evans
parent 768a15c1dd
commit c47cdfa66f
5 changed files with 40 additions and 11 deletions
+3 -3
View File
@@ -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)
}
+2 -2
View File
@@ -1,2 +1,2 @@
VALUE1
VALUE2
ENV1: VALUE1
ENV2: VALUE2