commit
2339ed4639
3
types.go
3
types.go
|
@ -64,6 +64,9 @@ type User struct {
|
||||||
// It is normally a user's username, but falls back to a first/last
|
// It is normally a user's username, but falls back to a first/last
|
||||||
// name as available.
|
// name as available.
|
||||||
func (u *User) String() string {
|
func (u *User) String() string {
|
||||||
|
if u == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
if u.UserName != "" {
|
if u.UserName != "" {
|
||||||
return u.UserName
|
return u.UserName
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue