// MustFindBox searches for boxes using the LocateOrder of the config, like
// FindBox does.  It does not return an error, instead it panics when an error
// occurs.
162455
func (c *Config) MustFindBox(boxName string) *Box {
	box, err := findBox(boxName, c.LocateOrder)
	if err != nil {
		panic(err)
	}
	return box
}
104336
func (fc *FeatureCollection) ForceBbox() BoundingBox {
	if len(fc.Bbox) > 0 {
		return fc.Bbox
	}
	var result BoundingBox
	for _, feature := range fc.Features {
		result = mergeBboxes(result, feature.ForceBbox())
	}
	return result
}
8128
func (v *Value) MustGet(dirty ...bool) (value interface{}) {
	value, err := v.Get(dirty...)
	if err != nil {
		panic(err)
	}
	return value
}
1175744
func (this Collection) MustFindAll(s interface{}) Collection {
    result := this.FindAll(s)
    if len(result) == 0 {
        panic("Match not found: " + getRegexpString(s))
    }

    return result
}
1040363
func (f *ToolsFinder) findMatchingTools(args params.FindToolsParams) (coretools.List, error) {
	exactMatch := args.Number != version.Zero && args.Series != "" && args.Arch != ""
	storageList, err := f.matchingStorageTools(args)
	if err == nil && exactMatch {
		return storageList, nil
	} else if err != nil && err != coretools.ErrNoMatches {
		return nil, err
	}

	// Look for tools in simplestreams too, but don't replace
	// any versions found in storage.
	env, err := environs.GetEnviron(f.configGetter, environs.New)
	if err != nil {
		return nil, err
	}
	filter := toolsFilter(args)
	cfg := env.Config()
	requestedStream := cfg.AgentStream()
	if args.AgentStream != "" {
		requestedStream = args.AgentStream
	}
	streams := envtools.PreferredStreams(&args.Number, cfg.Development(), requestedStream)
	simplestreamsList, err := envtoolsFindTools(
		env, args.MajorVersion, args.MinorVersion, streams, filter,
	)
	if len(storageList) == 0 && err != nil {
		return nil, err
	}

	list := storageList
	found := make(map[version.Binary]bool)
	for _, tools := range storageList {
		found[tools.Version] = true
	}
	for _, tools := range simplestreamsList {
		if !found[tools.Version] {
			list = append(list, tools)
		}
	}
	sort.Sort(list)
	return list, nil
}
395610
func (c *ContainerServer) HasSandbox(id string) bool {
	return c.state.sandboxes.Get(id) != nil
}
191504
func (c *Context) MustGet(key string) interface{} {
	if value, exists := c.Get(key); exists {
		return value
	}
	panic("Key \"" + key + "\" does not exist")
}
85525
func (gc GeometryCollection) ForceBbox() BoundingBox {
	if len(gc.Bbox) > 0 {
		return gc.Bbox
	}
	var result BoundingBox
	for _, geometry := range gc.Geometries {
		if bboxIfc, ok := geometry.(BoundingBoxIfc); ok {
			result = mergeBboxes(result, bboxIfc.ForceBbox())
		}
	}
	return result
}
77897
func (feature *Feature) ForceBbox() BoundingBox {
	if len(feature.Bbox) > 0 {
		return feature.Bbox
	}
	feature.ResolveGeometry()
	if bboxIfc, ok := feature.Geometry.(BoundingBoxIfc); ok {
		return bboxIfc.ForceBbox()
	}
	log.Printf("Feature %v does not have a Geometry that can be made into a Bounding Box: %#v", feature.IDStr(), feature.Geometry)
	return BoundingBox{}
}
407960
func (c *Config) mustString(name string) string {
	value, _ := c.defined[name].(string)
	if value == "" {
		panic(fmt.Errorf("empty value for %q found in configuration (type %T, val %v)", name, c.defined[name], c.defined[name]))
	}
	return value
}
427804
func (contracts *Contracts) FindContract(id string) (*Contract, error) {
	var contract *Contract
	var contractFound bool
	for _, contract = range contracts.Contracts.Items {
		if contract.ContractID == id {
			contractFound = true
			break
		}
	}

	if !contractFound {
		return nil, fmt.Errorf("Unable to find contract: \"%s\"", id)
	}

	return contract, nil
}
841099
func (c *ConfigFile) MustBool(section, key string, defaultVal ...bool) bool {
	val, err := c.Bool(section, key)
	if len(defaultVal) > 0 && err != nil {
		return defaultVal[0]
	}
	return val
}
399691
func (c *defConfigBackend) Lookup(key string) (interface{}, bool) {
	value := c.configViper.Get(key)
	if value == nil {
		return nil, false
	}
	return value, true
}
48929
func (b *Box) MustString(name string) (string, error) {
	oncer.Deprecate(0, "github.com/gobuffalo/packr/v2#Box.MustString", "Use github.com/gobuffalo/packr/v2#Box.FindString instead.")
	return b.FindString(name)
}
823647
func FindMatch(s string, options []string) (match string, found bool) {
	for _, opt := range options {
		if strings.ToLower(opt) == strings.ToLower(s) {
			return opt, true
		}
	}
	return "", false
}
648355
func (b *Box) FindString(name string) (string, error) {
	bb, err := b.Find(name)
	return string(bb), err
}
28847
func (c *Context) MustBindWith(obj interface{}, b binding.Binding) error {
	if err := c.ShouldBindWith(obj, b); err != nil {
		c.AbortWithError(http.StatusBadRequest, err).SetType(ErrorTypeBind) // nolint: errcheck
		return err
	}
	return nil
}