// Get gets the kernel information from the /proc/version file using the
// package's global profiler.
433586
func Get() (k *Kernel, err error) {
	stdMu.Lock()
	defer stdMu.Unlock()
	if std == nil {
		std, err = NewProfiler()
		if err != nil {
			return nil, err
		}
	}
	return std.Get()
}
1304082
func Get(err error) (int, bool) {
	err = errors.Unwrap(err)
	if err == nil {
		return 0, true
	}

	if ee, ok := err.(*exec.ExitError); ok {
		return ee.Sys().(syscall.WaitStatus).ExitStatus(), true
	}
	return 0, false
}
1024592
func (prof *Profiler) Get() (la LoadAvg, err error) {
	err = prof.Reset()
	if err != nil {
		return la, err
	}
	var (
		i, priorPos, pos, line, fieldNum int
		n                                uint64
		f                                float64
		v                                byte
	)
	la.Timestamp = time.Now().UTC().UnixNano()
	for {
		prof.Line, err = prof.ReadSlice('\n')
		if err != nil {
			if err == io.EOF {
				break
			}
			return la, &joe.ReadError{Err: err}
		}
		line++
		for {
			// space delimits the values
			for i, v = range prof.Line[pos:] {
				if v == 0x20 {
					priorPos, pos = pos, pos+i+1
					break
				}
			}
			fieldNum++
			if fieldNum <= 3 {
				f, err = strconv.ParseFloat(string(prof.Line[priorPos:pos-1]), 64)
				if err != nil {
					return la, &joe.ParseError{Info: fmt.Sprintf("line %d: field %d", line, fieldNum), Err: err}
				}
				if fieldNum == 1 {
					la.Minute = float32(f)
					continue
				}
				if fieldNum == 2 {
					la.Five = float32(f)
					continue
				}
				la.Fifteen = float32(f)
				continue
			}
			if fieldNum == 4 {
				// get the process information: separated by /
				for i, v = range prof.Line[priorPos:pos] {
					if v == '/' {
						break
					}
				}
				n, err = helpers.ParseUint(prof.Line[priorPos : priorPos+i])
				if err != nil {
					return la, &joe.ParseError{Info: fmt.Sprintf("line %d: field %d", line, fieldNum), Err: err}
				}
				la.Running = int32(n)
				n, err = helpers.ParseUint(prof.Line[priorPos+i+1 : pos-1])
				if err != nil {
					return la, &joe.ParseError{Info: fmt.Sprintf("line %d: field %d", line, fieldNum), Err: err}
				}
				la.Total = int32(n)
				continue
			}
			n, err = helpers.ParseUint(prof.Line[pos : len(prof.Line)-1])
			if err != nil {
				return la, err
			}
			la.PID = int32(n)
			break
		}
	}
	return la, nil
}
80951
func (c Cache) Get(k interface{}) (interface{}, bool) {
	v, ok := c[k]
	return v, ok
}
254560
func (a *templateLoader) Get(tmpl string) (io.Reader, error) {
	tmpl += a.ext
	tmpl = strings.TrimPrefix(tmpl, a.templateDir)
	b, e := a.template.RawContent(tmpl)
	if e != nil {
		a.logger.Error(e)
	}
	buf := new(bytes.Buffer)
	buf.Write(b)
	return buf, e
}
1266165
func (c *priorityClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.PriorityClass, err error) {
	result = &v1alpha1.PriorityClass{}
	err = c.client.Get().
		Resource("priorityclasses").
		Name(name).
		VersionedParams(&options, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}
114432
func (s *GlobalStore) Get(addr common.Address, key []byte) (data []byte, err error) {
	s.mu.RLock()
	defer s.mu.RUnlock()

	if _, has := s.nodeKeyIndex(addr, key); !has {
		return nil, mock.ErrNotFound
	}

	data, ok := s.data[string(key)]
	if !ok {
		return nil, mock.ErrNotFound
	}
	return data, nil
}
712240
func (prof *Profiler) Get() (inf *CPUInfo, err error) {
	var (
		cpuCnt, i, pos, nameLen int
		n                       uint64
		physIDs                 []int32 // tracks unique physical IDs encountered
		pidFound                bool
		v                       byte
		tmp                     string
		cpu                     CPU
	)
	err = prof.Reset()
	if err != nil {
		return nil, err
	}
	inf = &CPUInfo{Timestamp: time.Now().UTC().UnixNano()}
	for {
		prof.Line, err = prof.ReadSlice('\n')
		if err != nil {
			if err == io.EOF {
				break
			}
			return nil, &joe.ReadError{Err: err}
		}
		prof.Val = prof.Val[:0]
		// First grab the attribute name; everything up to the ':'.  The key may have
		// spaces and has trailing spaces; that gets trimmed.
		for i, v = range prof.Line {
			if v == 0x3A {
				prof.Val = prof.Line[:i]
				pos = i + 1
				break
			}
			//prof.Val = append(prof.Val, v)
		}
		prof.Val = joe.TrimTrailingSpaces(prof.Val[:])
		nameLen = len(prof.Val)
		// if there's no name; skip.
		if nameLen == 0 {
			continue
		}
		// if there's anything left, the value is everything else; trim spaces
		if pos+1 < len(prof.Line) {
			prof.Val = append(prof.Val, joe.TrimTrailingSpaces(prof.Line[pos+1:])...)
		}
		v = prof.Val[0]
		if v == 'a' {
			v = prof.Val[1]
			if v == 'd' { // address sizes
				cpu.AddressSizes = strings.Split(string(prof.Val[nameLen:]), ", ")
				continue
			}
			if v == 'p' { // apicid
				n, err = helpers.ParseUint(prof.Val[nameLen:])
				if err != nil {
					return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
				}
				cpu.APICID = int32(n)
			}
			continue
		}
		if v == 'c' {
			v = prof.Val[1]
			if v == 'p' {
				v = prof.Val[4]
				if v == 'c' { // cpu cores
					n, err = helpers.ParseUint(prof.Val[nameLen:])
					if err != nil {
						return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
					}
					cpu.CPUCores = int32(n)
					continue
				}
				if v == 'f' { // cpu family
					cpu.CPUFamily = string(prof.Val[nameLen:])
					continue
				}
				if v == 'M' { // cpu MHz
					f, err := strconv.ParseFloat(string(prof.Val[nameLen:]), 32)
					if err != nil {
						return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
					}
					cpu.CPUMHz = float32(f)
					continue
				}
				if v == 'd' { // cpuid level
					cpu.CPUIDLevel = string(prof.Val[nameLen:])
				}
				continue
			}
			v = prof.Val[5]
			if v == '_' { // cache_alignment
				n, err = helpers.ParseUint(prof.Val[nameLen:])
				if err != nil {
					return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
				}

				cpu.CacheAlignment = uint16(n)
				continue
			}
			if v == ' ' { // cache size
				cpu.CacheSize = string(prof.Val[nameLen:])
				continue
			}
			if v == 's' { // clflush size
				n, err = helpers.ParseUint(prof.Val[nameLen:])
				if err != nil {
					return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
				}
				cpu.CLFlushSize = uint16(n)
				continue
			}
			if v == 'i' { // core id
				n, err = helpers.ParseUint(prof.Val[nameLen:])
				if err != nil {
					return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
				}
				cpu.CoreID = int32(n)
			}
			continue
		}
		if v == 'f' {
			v = prof.Val[1]
			if v == 'l' { // flags
				cpu.Flags = strings.Split(string(prof.Val[nameLen:]), " ")
				continue
			}
			if v == 'p' {
				if nameLen == 3 { // fpu
					cpu.FPU = string(prof.Val[nameLen:])
				} else { // fpu_exception
					cpu.FPUException = string(prof.Val[nameLen:])
				}
			}
			continue
		}
		if v == 'm' {
			v = prof.Val[1]
			if v == 'i' { // microcode
				cpu.Microcode = string(prof.Val[nameLen:])
				continue
			}
			if v == 'o' {
				if nameLen == 5 { // model
					cpu.Model = string(prof.Val[nameLen:])
					continue
				}
				cpu.ModelName = string(prof.Val[nameLen:])
			}
			continue
		}
		if v == 'p' {
			v = prof.Val[1]
			if v == 'h' { // physical id
				n, err = helpers.ParseUint(prof.Val[nameLen:])
				if err != nil {
					return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
				}
				cpu.PhysicalID = int32(n)
				for i := range physIDs {
					if physIDs[i] == cpu.PhysicalID {
						pidFound = true
						break
					}
				}
				if pidFound {
					pidFound = false // reset for next use
				} else {
					// physical id hasn't been encountered yet; add it
					physIDs = append(physIDs, cpu.PhysicalID)
				}
				continue
			}
			if v == 'o' { // power management
				tmp = string(prof.Val[nameLen:])
				if tmp == "" {
					continue
				}
				cpu.PowerManagement = strings.Split(tmp, " ")
				continue
			}
			// processor starts information about a processor.
			if v == 'r' { // processor
				if cpuCnt > 0 {
					inf.CPU = append(inf.CPU, cpu)
				}
				cpuCnt++
				n, err = helpers.ParseUint(prof.Val[nameLen:])
				if err != nil {
					return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
				}
				cpu = CPU{Processor: int32(n)}
			}
			continue
		}
		if v == 's' {
			v = prof.Val[1]
			if v == 'i' { // siblings
				n, err = helpers.ParseUint(prof.Val[nameLen:])
				if err != nil {
					return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
				}
				cpu.Siblings = int8(n)
				continue
			}
			if v == 't' { // stepping
				cpu.Stepping = string(prof.Val[nameLen:])
			}
			continue
		}
		if v == 'b' {
			if prof.Val[1] == 'o' { // bogomips
				f, err := strconv.ParseFloat(string(prof.Val[nameLen:]), 32)
				if err != nil {
					return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
				}
				cpu.BogoMIPS = float32(f)
				continue
			}
			if prof.Val[1] == 'u' { // bugs
				tmp = string(prof.Val[nameLen:])
				if tmp != "" {
					cpu.Bugs = strings.Split(tmp, " ")
				}
			}
			continue
		}
		if v == 'i' { // initial apicid
			n, err = helpers.ParseUint(prof.Val[nameLen:])
			if err != nil {
				return nil, &joe.ParseError{Info: string(prof.Val[:nameLen]), Err: err}
			}
			cpu.InitialAPICID = int32(n)
			continue
		}
		if v == 'w' { // WP
			cpu.WP = string(prof.Val[nameLen:])
			continue
		}
		if v == 'v' { // vendor_id
			cpu.VendorID = string(prof.Val[nameLen:])
		}
		if v == 'T' { //tlb size
			cpu.TLBSize = string(prof.Val[nameLen:])
		}
	}
	// append the current processor informatin
	inf.CPU = append(inf.CPU, cpu)
	inf.Sockets = int32(len(physIDs))
	return inf, nil
}
240339
func Get() (stat *structs.DiskStats, err error) {
	stdMu.Lock()
	defer stdMu.Unlock()
	if std == nil {
		std, err = NewProfiler()
		if err != nil {
			return nil, err
		}
	}
	return std.Get()
}
1211350
func (s *StatsRecorder) Get(base int64) bgzf.Block {
	s.mu.Lock()
	s.stats.Gets++
	blk := s.Cache.Get(base)
	if blk == nil {
		s.stats.Misses++
	}
	s.mu.Unlock()
	return blk
}
1212771
func (c *ZkConn) Get(ctx context.Context, path string) (data []byte, stat *zk.Stat, err error) {
	err = c.withRetry(ctx, func(conn *zk.Conn) error {
		data, stat, err = conn.Get(path)
		return err
	})
	return
}
1196583
func (s *Storage) Get(name string, version int32) (*rspb.Release, error) {
	s.Log("getting release %q", makeKey(name, version))
	return s.Driver.Get(makeKey(name, version))
}
393789
func (b UpdateMap) Get(ns, coll, key string) *statedb.VersionedValue {
	nsPvtBatch, ok := b[ns]
	if !ok {
		return nil
	}
	return nsPvtBatch.Get(coll, key)
}
1029334
func (rl *MemoryReplayLog) Get(hash *HashPrefix) (uint32, error) {
	if rl.entries == nil || rl.batches == nil {
		return 0, errReplayLogNotStarted
	}

	cltv, exists := rl.entries[*hash]
	if !exists {
		return 0, ErrLogEntryNotFound
	}

	return cltv, nil
}
1235457
func Get() *Info {
	ver := Info{}
	ver.GitCommit = gitCommit
	ver.Version = version
	ver.BuildTime = buildTime

	return &ver
}
1257708
func Get(key string, args ...interface{}) data.Value {
	return defaultCacher().Get(key, args...)
}
1340449
func (p *Packfile) Get(h plumbing.Hash) (plumbing.EncodedObject, error) {
	offset, err := p.FindOffset(h)
	if err != nil {
		return nil, err
	}

	return p.objectAtOffset(offset, h)
}