code: func getAttrByName(name string, attrs []Attribute) Attribute {
  	for _, attr := range attrs {
  		if attr.GetName() == name {
  			return attr
  		}
  	}
  	return nil
  }
docs: // Get an attribute from 'attrs' by its name, or nil if not found