code: func claimsIntfAttrValue(claims claimsIntf, attr string, at time.Time, signerFilter SignerRefSet) string {
  	if claims == nil {
  		panic("nil claims argument in claimsIntfAttrValue")
  	}
  
  	if at.IsZero() {
  		at = time.Now()
  	}
  
  	// use a small static buffer as it speeds up
  	// search.BenchmarkQueryPermanodeLocation by 6-7%
  	// with go 1.7.1
  	var buf [8]string
  	v := buf[:][:0]
  
  	for i := 0; i < claims.Len(); i++ {
  		cl := claims.Claim(i)
  		if cl.Attr != attr || cl.Date.After(at) {
  			continue
  		}
  
  		if len(signerFilter) > 0 {
  			if !signerFilter.blobMatches(cl.Signer) {
  				continue
  			}
  		}
  
  		switch cl.Type {
  		case string(schema.DelAttributeClaim):
  			if cl.Value == "" {
  				v = v[:0]
  			} else {
  				i := 0
  				for _, w := range v {
  					if w != cl.Value {
  						v[i] = w
  						i++
  					}
  				}
  				v = v[:i]
  			}
  		case string(schema.SetAttributeClaim):
  			v = append(v[:0], cl.Value)
  		case string(schema.AddAttributeClaim):
  			v = append(v, cl.Value)
  		}
  	}
  	if len(v) != 0 {
  		return v[0]
  	}
  	return ""
  }
docs: // claimsIntfAttrValue finds the value of an attribute in a list of claims
  // or empty string if not found. claims must be non-nil.
  // If signerFilter contains any refs, a claim is only taken into account if it
  // has been signed by one of the given signer refs.