// checkSuperSet checks if the items in l are all also present in r. func checkSuperSet(l, r transport.Headers) error { missing := make([]string, 0, l.Len()) for k, vl := range l.Items() { vr, ok := r.Get(k) if !ok || vr != vl { missing = append(missing, k) } } if len(missing) > 0 { return fmt.Errorf("missing headers: %v", strings.Join(missing, ", ")) } return nil }