You have a variable of type *user.User. The documentation (https://golang.org/pkg/os/user/#User) says there is a field on that type called "Username". To get the username of a user you should therefore use username.Username (but that's too stuttery, perhaps "u, err := user.Current()" and then use u.Username)
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
