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