func (m *Message) LargestPhoto() PhotoSize {
	if !m.HasPhoto() {
		return PhotoSize{}
	}

	var maxIndex int
	for i, photo := range m.Photo {
		if photo.FileSize > m.Photo[maxIndex].FileSize {
			maxIndex = i
		}
	}
	return m.Photo[maxIndex]
}
// LargestPhoto returns a photo with the largest file size.
LargestPhoto returns a photo with the largest file size.
// LargestPhoto returns a photo with the largest file size .
func (m *Message) LargestPhoto() PhotoSize {
	if !m.HasPhoto() {
		return PhotoSize{}
	}
	var maxIndex int
	for i, photo := range m.Photo {
		if photo.FileSize > m.Photo[maxIndex].FileSize {
			maxIndex = i
		}
	}
	return m.Photo[maxIndex]
}
func ( m * Message ) LargestPhoto ( ) PhotoSize { if ! m . HasPhoto ( ) { return PhotoSize { } } var maxIndex int for i , photo := range m . Photo { if photo . FileSize > m . Photo [ maxIndex ] . FileSize { maxIndex = i } } return m . Photo [ maxIndex ] }
LargestPhoto returns a photo with the largest file size.
LargestPhoto returns a photo with the largest file size .