// GetKey returns key in section by given name.
1498
func (s *Section) GetKey(name string) (*Key, error) {
	if s.f.BlockMode {
		s.f.lock.RLock()
	}
	if s.f.options.Insensitive {
		name = strings.ToLower(name)
	}
	key := s.keys[name]
	if s.f.BlockMode {
		s.f.lock.RUnlock()
	}

	if key == nil {
		// Check if it is a child-section.
		sname := s.name
		for {
			if i := strings.LastIndex(sname, "."); i > -1 {
				sname = sname[:i]
				sec, err := s.f.GetSection(sname)
				if err != nil {
					continue
				}
				return sec.GetKey(name)
			}
			break
		}
		return nil, fmt.Errorf("error when getting key of section '%s': key '%s' not exists", s.name, name)
	}
	return key, nil
}
221673
func (section *Section) GetSection(name string) (*Section, error) {
	value, err := section.Get(name)
	if err != nil {
		return nil, err
	}

	if value.GetType() == SECTION {
		return value.(*Section), nil
	}
	return nil, errors.New("could not fetch value as section")
}
876297
func (ini *INI) SectionGet(section, key string) (value string, ok bool) {
    if s := ini.sections[section]; s != nil {
        value, ok = s[key]
    }
    return
}
499879
func (rdb *RethinkDBKeyStore) GetKey(keyID string) data.PublicKey {
	dbPrivateKey, _, err := rdb.getKey(keyID)
	if err != nil {
		return nil
	}

	return data.NewPublicKey(dbPrivateKey.Algorithm, dbPrivateKey.Public)
}
543925
func (ini *INI) Get(key string) (string, bool) {
    return ini.SectionGet(DefaultSection, key)
}
572005
func (f *File) SetKey(key, value string) {
	name, k := f.NameSplitFunc(key)

	// get the section
	section := f.GetSection(name)
	if section == nil {
		section = f.AddSection(name)
	}

	section.SetKey(k, value)
}
1197048
func (s *SQLKeyDBStore) GetKey(keyID string) data.PublicKey {
	privKey, _, err := s.getKey(keyID, false)
	if err != nil {
		return nil
	}
	return data.NewPublicKey(privKey.Algorithm, []byte(privKey.Public))
}
939946
func (b *BigIP) GetKey(name string) (*Key, error) {
	var key Key
	err, ok := b.getForEntity(&key, uriSys, uriFile, uriSslKey, name)
	if err != nil {
		return nil, err
	}
	if !ok {
		return nil, nil
	}

	return &key, nil
}
1089847
func (s *Section) getKey(key string) (*KeyValuePair, int) {
	// loop over lines and find the key
	lastSectionName := ""
	var lastSectionPos position
	for lastIdx, l := range s.file.lines {
		switch l.item.(type) {
		case *Section:
			if lastSectionName == s.name && lastSectionPos == s.pos {
				// must be entering a new section; so not found, return
				return nil, s.getInsertLocation(lastIdx - 1)
			}

			sect, _ := l.item.(*Section)
			lastSectionName = sect.name
			lastSectionPos = sect.pos

		case *KeyValuePair:
			kvp, _ := l.item.(*KeyValuePair)
			//fmt.Printf(">>> compare: %s//%s :: %s//%s\n", lastSectionName, s.name, kvp.key, key)
			if (lastSectionName == s.name && lastSectionPos == s.pos) && s.file.KeyCompFunc(kvp.key, key) {
				return kvp, lastIdx
			}
		}
	}

	// if we get here, then must be last section of file
	return nil, s.getInsertLocation(len(s.file.lines) - 1)
}
1054280
func GetKey(b []byte) Key {
	for _, k := range ASCIISequences {
		if bytes.Equal(k.ASCIICode, b) {
			return k.Key
		}
	}
	return NotDefined
}
463258
func (f *jwtFilter) getKey(token *jwt.Token) (interface{}, error) {
	return f.publicKey, nil
}
116120
func GetKeyName(key Key, scancode int) string {
	ret := C.glfwGetKeyName(C.int(key), C.int(scancode))
	panicError()
	return C.GoString(ret)
}
324025
func (t Sections) GetSection(p string) (Section, bool) {
	v, ok := t.container[p]
	return v, ok
}
1231992
func (v *KeyValue_GetValue_Args) GetKey() (o string) {
	if v != nil && v.Key != nil {
		return *v.Key
	}

	return
}
282711
func (v *ResourceDoesNotExist) GetKey() (o string) {
	if v != nil {
		o = v.Key
	}
	return
}
1100508
func getKey(key interface{}) (Key, rune, error) {
	switch t := key.(type) {
	case Key:
		return t, 0, nil
	case rune:
		return 0, t, nil
	default:
		return 0, 0, errors.New("unknown type")
	}
}
1016968
func (c *MemcacheClient) GetKey(k cache.Keyer) ([]byte, time.Time, error) {
	cacheItem, err := c.client.Get(k.Key())
	if err != nil {
		if err == memcache.ErrCacheMiss {
			// Don't log on cache miss
			return []byte{}, time.Time{}, cache.ErrNotCached
		} else {
			c.logger.Log("err", errors.Wrap(err, "Fetching tag from memcache"))
			return []byte{}, time.Time{}, err
		}
	}
	deadlineTime := binary.BigEndian.Uint32(cacheItem.Value)
	return cacheItem.Value[4:], time.Unix(int64(deadlineTime), 0), nil
}