This commit is contained in:
Mark McGranaghan 2012-09-23 12:22:06 -04:00
parent d07fbefb9b
commit 1b4e6913aa
3 changed files with 14 additions and 10 deletions

View File

@ -1,10 +0,0 @@
package main
import ("fmt"; "os/user")
func main() {
me, _ := user.Current()
fmt.Println(me)
root, _ := user.Lookup("root")
fmt.Println(root)
}

11
094-users/users.go Normal file
View File

@ -0,0 +1,11 @@
package main
import "fmt"
import "os/user"
func main() {
me, _ := user.Current()
fmt.Println(me)
root, _ := user.Lookup("root")
fmt.Println(root)
}

3
094-users/users.sh Normal file
View File

@ -0,0 +1,3 @@
$ go run users.go
&{501 20 mmcgrana Mark McGranaghan /Users/mmcgrana}
&{0 0 root System Administrator /var/root}