// GetUnsafeString returns the value retrieved by `Get`, use creates string without memory allocation by mapping string to slice memory. It does not handle escape symbols.
976008
func GetUnsafeString(data []byte, keys ...string) (val string, err error) {
	v, _, _, e := Get(data, keys...)

	if e != nil {
		return "", e
	}

	return bytesToString(&v), nil
}
126744
func (r RequestParams) GetIntUnslashed(key string) (int, bool) {
	v := r.Get(key)
	if v != "" {
		if len(v) > 1 {
			if v[0] == '/' {
				v = v[1:]
			}
		}

		vInt, err := strconv.Atoi(v)
		if err != nil {
			return -1, false
		}
		return vInt, true
	}

	return -1, false
}
317234
func (s *Server) GetRing(c context.Context, e *pb.EmptyMsg) (*pb.Ring, error) {
	s.RLock()
	defer s.RUnlock()
	return &pb.Ring{Version: s.r.Version(), Ring: *s.rb}, nil
}
713638
func (context *BaseContext) GetString(
	key string, defaultValue ...string) string {
	if value, ok := context.userData[key]; ok {
		if value, ok := value.(string); ok {
			return value
		}
	}
	if len(defaultValue) > 0 {
		return defaultValue[0]
	}
	return ""
}
828232
func (u *User) GetDiskUsage() int {
	if u == nil || u.DiskUsage == nil {
		return 0
	}
	return *u.DiskUsage
}
264375
func (c *config) GetString(key string, args ...interface{}) string {
	val, err := c.GetStringErr(key, args...)
	if err != nil {
		c.errorHandler(key, err, args...)
	}
	return val
}
66532
func (m *Manager) GetString(key string) string {
	return cast.ToString(m.Get(key))
}
305836
func getParseFunc(log []byte) (parseFunc, error) {
	for _, p := range parseFuncs {
		if err := p(log, &logMessage{}); err == nil {
			return p, nil
		}
	}
	return nil, fmt.Errorf("unsupported log format: %q", log)
}
283558
func get(path string, name string, getxattrFunc getxattrFunc) ([]byte, error) {
	const (
		// Start with a 1 KB buffer for the xattr value
		initialBufSize = 1024

		// The theoretical maximum xattr value size on MacOS is 64 MB. On Linux it's
		// much smaller at 64 KB. Unless the kernel is evil or buggy, we should never
		// hit the limit.
		maxBufSize = 64 * 1024 * 1024

		// Function name as reported in error messages
		myname = "xattr.get"
	)

	size := initialBufSize
	for {
		data := make([]byte, size)
		read, err := getxattrFunc(name, data)

		// If the buffer was too small to fit the value, Linux and MacOS react
		// differently:
		// Linux: returns an ERANGE error and "-1" bytes.
		// MacOS: truncates the value and returns "size" bytes. If the value
		//   happens to be exactly as big as the buffer, we cannot know if it was
		//   truncated, and we retry with a bigger buffer. Contrary to documentation,
		//   MacOS never seems to return ERANGE!
		// To keep the code simple, we always check both conditions, and sometimes
		// double the buffer size without it being strictly neccessary.
		if err == syscall.ERANGE || read == size {
			// The buffer was too small. Try again.
			size <<= 1
			if size >= maxBufSize {
				return nil, &Error{myname, path, name, syscall.EOVERFLOW}
			}
			continue
		}
		if err != nil {
			return nil, &Error{myname, path, name, err}
		}
		return data[:read], nil
	}
}
189720
func (s *Session) GetString(ctx context.Context, key string) string {
	val := s.Get(ctx, key)
	str, ok := val.(string)
	if !ok {
		return ""
	}
	return str
}
1300417
func getMessage(token []byte) interface{} {
	var data map[string]interface{}
	// unmarshal JSON encoded token into a map for
	err := json.Unmarshal(token, &data)
	if err != nil {
		return err
	}
	return decodeMessage(token, data)
}
526326
func findUnusedCluster(clusterMap *Map, leaseMap *leases.Map, clusterRegex string, clusterVersion string) (*containerservice.ContainerService, error) {
	if clusterRegex != "" {
		return findUnusuedClusterByName(clusterMap, leaseMap, clusterRegex)
	} else if clusterVersion != "" {
		return findUnusedClusterByVersion(clusterMap, leaseMap, clusterVersion)
	} else {
		return findRandomUnusuedCluster(clusterMap, leaseMap)
	}
}
1350424
func (c *FakeFlunders) Get(name string, options v1.GetOptions) (result *v1beta1.Flunder, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(flundersResource, c.ns, name), &v1beta1.Flunder{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Flunder), err
}
839318
func (i *Import) GetVCSPassword() string {
	if i == nil || i.VCSPassword == nil {
		return ""
	}
	return *i.VCSPassword
}
462163
func GetString(key string) (string, error) {
	value, err := Get(key)
	if err != nil {
		return "", err
	}
	switch v := value.(type) {
	case int:
		return strconv.Itoa(v), nil
	case int64:
		return strconv.FormatInt(v, 10), nil
	case string:
		return v, nil
	}
	return "", &InvalidValue{key, "string|int|int64"}
}
482983
func (c *Context) GetString(key interface{}) string {
	store := c.getStore()
	if value, ok := store[key]; ok {
		if typed, ok := value.(string); ok {
			return typed
		}
	}
	if c.Parent != nil {
		return c.Parent.GetString(key)
	}
	return ""
}
642134
func getAppUsageString() string {
	return colorize.Colorize(fmt.Sprintf(usageString, getAllCommands(), getAllOptions(), wol.Version))
}