Sign in
go
/
talks
/
a07c284bcf333dc17a1489fd441e8fccf1e01c2a
/
.
/
content
/
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]))
}