mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 08:29:57 +00:00

The lucas-clemente/quic-go package moved namespaces and our branch went stale, this new fork provides support for the new quic-go repo and applies the max datagram frame size change. Until the max datagram frame size support gets upstreamed into quic-go, this can be used to unblock go 1.20 support as the old lucas-clemente/quic-go will not get go 1.20 support.
23 lines
534 B
Go
23 lines
534 B
Go
package watch
|
|
|
|
import "sort"
|
|
|
|
type Delta struct {
|
|
ModifiedPackages []string
|
|
|
|
NewSuites []*Suite
|
|
RemovedSuites []*Suite
|
|
modifiedSuites []*Suite
|
|
}
|
|
|
|
type DescendingByDelta []*Suite
|
|
|
|
func (a DescendingByDelta) Len() int { return len(a) }
|
|
func (a DescendingByDelta) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
|
func (a DescendingByDelta) Less(i, j int) bool { return a[i].Delta() > a[j].Delta() }
|
|
|
|
func (d Delta) ModifiedSuites() []*Suite {
|
|
sort.Sort(DescendingByDelta(d.modifiedSuites))
|
|
return d.modifiedSuites
|
|
}
|