Пример #1
0
func (c *connection) lastHelpful() time.Time {
	lasts := []time.Time{c.lastUsefulChunkReceived}
	if c.t.seeding() {
		lasts = append(lasts, c.lastChunkSent)
	}
	return missinggo.Max(time.Time.Before, slices.ToEmptyInterface(lasts)...).(time.Time)
}
Пример #2
0
func StringIterator(a string) Iterator {
	return SliceIterator(slices.ToEmptyInterface(a))
}