Sign in
go
/
website
/
4c8263311032e41afd73fd00478a93dac869e081
/
.
/
_content
/
talks
/
2017
/
state-of-go-may
/
exec
/
getenv
/
main.go
blob: 08e649282176da39df9c3ea52721622f771dd67d [
file
] [
log
] [
blame
]
package main
import (
"fmt"
"os"
)
func main() {
if len(os.Args) != 2 {
fmt.Printf("use %s varname\n", os.Args[0])
os.Exit(1)
}
fmt.Println(os.Getenv(os.Args[1]))
}