// GetAtt provides a helper for the GetAtt function.
512262
func GetAtt(ref, attr interface{}) interface{} {
	switch v := ref.(type) {
	case NamedResource:
		ref = v.Name
	}
	return map[string][]interface{}{"Fn::GetAtt": []interface{}{ref, attr}}
}
967598
func getAttr(attribute string, node *html.Node) (string, bool) {
	for _, attr := range node.Attr {
		if attribute == attr.Key {
			return attr.Val, true
		}
	}
	return "", false
}
884976
func (m *MockCluster) GetData() (map[string]*api.Node, error) {
	ret := m.ctrl.Call(m, "GetData")
	ret0, _ := ret[0].(map[string]*api.Node)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
492333
func (e *Error) GetData(key DataKey) interface{} {
	if e.data != nil {
		val, ok := e.data[key]
		if ok {
			return val
		}
		if boolWrapper(e.data[disableInheritance], false) {
			return nil
		}
	}
	return e.class.data[key]
}
98552
func (m *Mat64Instances) GetAttribute(a Attribute) (AttributeSpec, error) {
	for i, at := range m.attributes {
		if at.Equals(a) {
			return AttributeSpec{0, i, at}, nil
		}
	}
	return AttributeSpec{}, fmt.Errorf("Couldn't find a matching attribute")
}
539388
func (f *GetAttFunc) UnmarshalJSON(data []byte) error {
	v := struct {
		FnGetAtt []string `json:"Fn::GetAtt"`
	}{}
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	if len(v.FnGetAtt) != 2 {
		return &json.UnsupportedValueError{Str: string(data)}
	}
	f.Resource = v.FnGetAtt[0]
	f.Name = v.FnGetAtt[1]
	return nil
}
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
}
122488
func TcGetAttr(fd uintptr) (*Termios, error) {
	var termios = &Termios{}
	if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, getTermios, uintptr(unsafe.Pointer(termios))); err != 0 {
		return nil, err
	}
	return termios, nil
}
1192225
func GetAttr(v Value, attr Value, args ...Value) (Value, error) {
	r := reflect.Indirect(reflect.ValueOf(v))
	if !r.IsValid() {
		return nil, fmt.Errorf("getattr: value does not support attribute lookup: %v", v)
	}
	var retval reflect.Value
	switch r.Kind() {
	case reflect.Struct:
		strval := CoerceString(attr)
		retval = r.FieldByName(strval)
		if !retval.IsValid() {
			var err error
			retval, err = getMethod(v, strval)
			if err != nil {
				return nil, err
			}
		}
	case reflect.Map:
		retval = r.MapIndex(reflect.ValueOf(attr))
	case reflect.Slice, reflect.Array:
		index := int(CoerceNumber(attr))
		if index >= 0 && index < r.Len() {
			retval = r.Index(index)
		}
	}
	if !retval.IsValid() {
		return nil, fmt.Errorf("getattr: unable to locate attribute \"%s\" on \"%v\"", attr, v)
	}
	if retval.Kind() == reflect.Func {
		t := retval.Type()
		if t.NumOut() > 1 {
			return nil, fmt.Errorf("getattr: multiple return values unsupported, called method \"%s\" on \"%v\"", attr, v)
		}
		rargs := make([]reflect.Value, len(args))
		for k, v := range args {
			rargs[k] = reflect.ValueOf(v)
		}
		if t.NumIn() != len(rargs) {
			return nil, fmt.Errorf("getattr: method \"%s\" on \"%v\" expects %d parameter(s), %d given", attr, v, t.NumIn(), len(rargs))
		}
		res := retval.Call(rargs)
		if len(res) == 0 {
			return nil, nil
		}
		retval = res[0]
	}
	return retval.Interface(), nil
}
546921
func Getattr(fd int, state *Termios) (err error) {
	_, _, e1 := unix.Syscall(unix.SYS_IOCTL, uintptr(fd),
		uintptr(TCGETS), uintptr(unsafe.Pointer(state)))
	if e1 != 0 {
		err = e1
	}
	return
}
1258099
func (e *Element) GetAttributes() (map[string]string, error) {
	e.lock.RLock()
	attr, err := e.tab.DOM.GetAttributes(e.id)
	e.lock.RUnlock()

	if err != nil {
		return nil, err
	}
	for i := 0; i < len(attr); i += 2 {
		e.updateAttribute(attr[i], attr[i+1])
	}

	return e.attributes, nil
}
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")
}
49809
func GetData(err error, key DataKey) interface{} {
	cast, ok := err.(*Error)
	if ok {
		return cast.GetData(key)
	}
	return nil
}
1205413
func (r Account_Authentication_Attribute) GetType() (resp datatypes.Account_Authentication_Attribute_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_Account_Authentication_Attribute", "getType", nil, &r.Options, &resp)
	return
}
4087
func (m *Smart) getAttributes(acc telegraf.Accumulator, devices []string) {

	var wg sync.WaitGroup
	wg.Add(len(devices))

	for _, device := range devices {
		go gatherDisk(acc, m.UseSudo, m.Attributes, m.Path, m.Nocheck, device, &wg)
	}

	wg.Wait()
}
978322
func (k *Key) GetKey() string {
	if k == nil || k.Key == nil {
		return ""
	}
	return *k.Key
}
1056908
func GetAttribute(o *js.Object, key string) string {
	return o.Call("getAttribute", key).String()
}