1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package timex import "time" // Max returns the maximum duration func Max(values ...time.Duration) time.Duration { var ( max time.Duration ) for _, v := range values { if v > max { max = v } } return max }