@ -259,11 +259,7 @@ type UserProfile struct {
ID UserID
ID UserID
LoginName string // "alice@smith.com"; for display purposes only (provider is not listed)
LoginName string // "alice@smith.com"; for display purposes only (provider is not listed)
DisplayName string // "Alice Smith"
DisplayName string // "Alice Smith"
ProfilePicURL string
ProfilePicURL string ` json:",omitempty" `
// Roles exists for legacy reasons, to keep old macOS clients
// happy. It JSON marshals as [].
Roles emptyStructJSONSlice
}
}
func ( p * UserProfile ) Equal ( p2 * UserProfile ) bool {
func ( p * UserProfile ) Equal ( p2 * UserProfile ) bool {
@ -279,16 +275,6 @@ func (p *UserProfile) Equal(p2 *UserProfile) bool {
p . ProfilePicURL == p2 . ProfilePicURL
p . ProfilePicURL == p2 . ProfilePicURL
}
}
type emptyStructJSONSlice struct { }
var emptyJSONSliceBytes = [ ] byte ( "[]" )
func ( emptyStructJSONSlice ) MarshalJSON ( ) ( [ ] byte , error ) {
return emptyJSONSliceBytes , nil
}
func ( emptyStructJSONSlice ) UnmarshalJSON ( [ ] byte ) error { return nil }
// RawMessage is a raw encoded JSON value. It implements Marshaler and
// RawMessage is a raw encoded JSON value. It implements Marshaler and
// Unmarshaler and can be used to delay JSON decoding or precompute a JSON
// Unmarshaler and can be used to delay JSON decoding or precompute a JSON
// encoding.
// encoding.