users
This commit is contained in:
parent
d07fbefb9b
commit
1b4e6913aa
@ -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
11
094-users/users.go
Normal 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
3
094-users/users.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
$ go run users.go
|
||||||
|
&{501 20 mmcgrana Mark McGranaghan /Users/mmcgrana}
|
||||||
|
&{0 0 root System Administrator /var/root}
|
Loading…
x
Reference in New Issue
Block a user