env
This commit is contained in:
parent
f1b5e45784
commit
ebcadd96c3
5
README
5
README
@ -61,7 +61,6 @@ gobyexample.com signups
|
||||
* hipache port
|
||||
* templating
|
||||
* ssh
|
||||
* environment variables
|
||||
* dns
|
||||
* timers
|
||||
* tty
|
||||
@ -78,6 +77,10 @@ gobyexample.com signups
|
||||
* oauth for google domains
|
||||
* connection pool
|
||||
* typed json parse/unparse
|
||||
|
||||
* deploying to heroku
|
||||
* shipping a package (structure, github, docs)
|
||||
|
||||
* blackfriday
|
||||
|
||||
= program ideas
|
||||
|
17
src/xx-env.go
Normal file
17
src/xx-env.go
Normal file
@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import ("os"; "fmt"; "strings")
|
||||
|
||||
func main() {
|
||||
for _, e := range os.Environ() {
|
||||
pair := strings.Split(e, "=")
|
||||
fmt.Println(pair[0], pair[1])
|
||||
}
|
||||
fmt.Println()
|
||||
|
||||
fmt.Println(os.Getenv("PWD"))
|
||||
fmt.Println()
|
||||
|
||||
os.Setenv("FOO", "bar")
|
||||
fmt.Println(os.Getenv("FOO"))
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user