// GetAttribute returns an Attribute specification matching an Attribute
// if it has not been filtered.
//
// The AttributeSpecs returned are the same as those returned by the
// source FixedDataGrid.
964709
func (v *InstancesView) GetAttribute(a Attribute) (AttributeSpec, error) {
	if a == nil {
		return AttributeSpec{}, fmt.Errorf("Attribute can't be nil")
	}
	// Pass-through on nil
	if v.attrs == nil {
		return v.src.GetAttribute(a)
	}
	// Otherwise
	for _, r := range v.attrs {
		// If the attribute matches...
		if r.GetAttribute().Equals(a) {
			return r, nil
		}
	}
	return AttributeSpec{}, fmt.Errorf("Requested Attribute has been filtered")
}
662602
func (a Attributes) Get(key string) string {
	if a == nil {
		return ""
	}
	v := a[key]
	if len(v) == 0 {
		return ""
	}
	return v[0]
}
217560
func GetAtt(resource, name string) *StringExpr {
	return GetAttFunc{Resource: resource, Name: name}.String()
}
620964
func (e *Element) HasAttribute(name string) bool {
	attr, err := e.GetAttributes()
	if err != nil {
		return false
	}
	_, exists := attr[name]
	return exists
}
565302
func (c *Context) GetAttribLocation(program *js.Object, name string) int {
	return c.Call("getAttribLocation", program, name).Int()
}
1317020
func (c *connector) GetAttr(key string) interface{} {
	c.RLock()
	v := c.attrs[key]
	c.RUnlock()
	return v
}
971738
func (e *Entry) GetAttributeValues(attribute string) []string {
	for _, attr := range e.Attributes {
		if attr.Name == attribute {
			return attr.Values
		}
	}
	return []string{}
}
160073
func (c ConfigAttributes) Get(attrName string, defaultValue interface{}) interface{} {
	if val, ok := c[attrName]; ok {
		return val
	}
	return defaultValue
}
325328
func (w *Window) GetAttrib(attrib Hint) int {
	ret := int(C.glfwGetWindowAttrib(w.data, C.int(attrib)))
	panicError()
	return ret
}
448931
func (mgr *Mgr) GetAttributesFromCert(cert *x509.Certificate) (*Attributes, error) {
	// Get certificate attributes from the certificate if it exists
	buf, err := getAttributesFromCert(cert)
	if err != nil {
		return nil, err
	}
	// Unmarshal into attributes object
	attrs := &Attributes{}
	if buf != nil {
		err := json.Unmarshal(buf, attrs)
		if err != nil {
			return nil, errors.Wrap(err, "Failed to unmarshal attributes from certificate")
		}
	}
	return attrs, nil
}
70039
func GetAttrs(e Markup, f, val string) []*Attribute {

	var found []*Attribute

	for _, as := range e.Attributes() {
		if as.Name != f {
			continue
		}

		if val != "" {
			if !strings.Contains(as.Value, val) {
				continue
			}
		}

		found = append(found, as)
	}

	return found
}
531322
func (m AttributeMap) Get(name string, dst interface{}, opts ...mapdecode.Option) (bool, error) {
	v, ok := m[name]
	if !ok {
		return ok, nil
	}

	err := DecodeInto(dst, v, opts...)
	if err != nil {
		err = fmt.Errorf("failed to read attribute %q: %v. got error: %s", name, v, err)
	}
	return true, err
}
984697
func (f *ScmpFilter) getFilterAttr(attr scmpFilterAttr) (C.uint32_t, error) {
	f.lock.Lock()
	defer f.lock.Unlock()

	if !f.valid {
		return 0x0, errBadFilter
	}

	var attribute C.uint32_t

	retCode := C.seccomp_attr_get(f.filterCtx, attr.toNative(), &attribute)
	if retCode != 0 {
		return 0x0, syscall.Errno(-1 * retCode)
	}

	return attribute, nil
}
210260
func (f *FloatConvertFilter) AddAttribute(a base.Attribute) error {
	f.attrs = append(f.attrs, a)
	return nil
}
1360230
func MarshalAttribute(a Attribute) (map[string]interface{}, error) {
	ret := make(map[string]interface{})
	marshaledAttrRaw, err := a.MarshalJSON()
	if err != nil {
		return nil, err
	}
	err = json.Unmarshal(marshaledAttrRaw, &ret)
	if err != nil {
		return nil, err
	}
	return ret, nil
}
481098
func getAttrByName(name string, attrs []Attribute) Attribute {
	for _, attr := range attrs {
		if attr.GetName() == name {
			return attr
		}
	}
	return nil
}
1306993
func (r Account) GetAttributes() (resp []datatypes.Account_Attribute, err error) {
	err = r.Session.DoRequest("SoftLayer_Account", "getAttributes", nil, &r.Options, &resp)
	return
}