code: func (d *ClientDigestsFile) Sort() {
  	sort.Slice(d.entries, func(i, j int) bool {
  		l, r := d.entries[i], d.entries[j]
  		if l.plat != r.plat {
  			return l.plat < r.plat
  		}
  		return l.ref.HashAlgo > r.ref.HashAlgo // more recent algos first
  	})
  }
docs: // Sort orders the entries by (platform, -hashAlgo).