- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExampleLookupEnv (0.19 sec)
-
src/os/example_test.go
os.Setenv("NAME", "gopher") os.Setenv("BURROW", "/usr/gopher") fmt.Println(os.ExpandEnv("$NAME lives in ${BURROW}.")) // Output: // gopher lives in /usr/gopher. } func ExampleLookupEnv() { show := func(key string) { val, ok := os.LookupEnv(key) if !ok { fmt.Printf("%s not set\n", key) } else { fmt.Printf("%s=%s\n", key, val) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 17:35:49 UTC 2024 - 8.4K bytes - Viewed (0)