Sign in
go
/
website
/
94d899bc857dc17e9d6c9cad67cb6e75ffaad68d
/
.
/
_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]))
}