// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
4703
func MustAsset(name string) []byte {
	a, err := Asset(name)
	if (err != nil) {
		panic("asset: Asset(" + name + "): " + err.Error())
	}

	return a
}
659105
func (m multiLoader) MustLoad(s interface{}) {
	if err := m.Load(s); err != nil {
		panic(err)
	}
}
828126
func MustOverLoad(filenames ...string) {
	err := OverLoad(filenames...)
	if err != nil {
		panic(err.Error())
	}
}
1322570
func (f *Value) MustGet() interface{} {
	value, err := f.Get()
	if err != nil {
		panic(fmt.Sprintf("get returned error: %s", err))
	}
	return value
}
265345
func (k *Key) MustUint(defaultVal ...uint) uint {
	val, err := k.Uint()
	if len(defaultVal) > 0 && err != nil {
		k.value = strconv.FormatUint(uint64(defaultVal[0]), 10)
		return defaultVal[0]
	}
	return val
}
779843
func RestoreAssets(dir, name string) error {
	children, err := AssetDir(name)
	// File
	if err != nil {
		return RestoreAsset(dir, name)
	}
	// Dir
	for _, child := range children {
		err = RestoreAssets(dir, filepath.Join(name, child))
		if err != nil {
			return err
		}
	}
	return nil
}
63789
func assertAssetIsSane(asset stellar1.Asset) error {
	switch asset.Type {
	case "credit_alphanum4", "credit_alphanum12":
	case "alphanum4", "alphanum12": // These prefixes that are missing "credit_" shouldn't show up, but just to be on the safe side.
	default:
		return fmt.Errorf("unrecognized asset type: %v", asset.Type)
	}
	// Sanity check asset code very loosely. We know tighter bounds but there's no need to fail here.
	if len(asset.Code) == 0 || len(asset.Code) >= 20 {
		return fmt.Errorf("invalid asset code: %v", asset.Code)
	}
	return nil
}
1318268
func (b Box) MustBytes(name string) ([]byte, error) {
	return b.Find(name)
}
680606
func MustACName(s string) *ACName {
	n, err := NewACName(s)
	if err != nil {
		panic(err)
	}
	return n
}
320718
func MustCompile(rules string, variables map[string]interface{}) (r *Rules) {
	r, err := Compile(rules, variables)
	if err != nil {
		panic(err)
	}
	return
}
388481
func (u *Updater) downloadAsset(asset *Asset, tmpDir string, options UpdateOptions) error {
	if asset == nil {
		return fmt.Errorf("No asset to download")
	}
	downloadOptions := util.DownloadURLOptions{
		Digest:        asset.Digest,
		RequireDigest: true,
		UseETag:       true,
		Log:           u.log,
	}

	downloadPath := filepath.Join(tmpDir, asset.Name)
	// If asset had a file extension, lets add it back on
	if err := util.DownloadURL(asset.URL, downloadPath, downloadOptions); err != nil {
		return err
	}

	asset.LocalPath = downloadPath
	return nil
}
1282582
func Must(def Definition, err error) Definition {
	if err != nil {
		panic(err)
	}
	return def
}
108636
func (b *Bundle) MustRender(c context.Context, e *Extra, out io.Writer, name string, args Args) {
	blob, err := b.Render(c, e, name, args)
	if err != nil {
		panic(err)
	}
	_, err = out.Write(blob)
	if err != nil {
		panic(err)
	}
}
729652
func mustAtoi(value string) int {
	result, err := strconv.Atoi(value)
	if err != nil {
		panic(err)
	}
	return result
}
225959
func (g *GeometryCollection) MustPush(gs ...T) *GeometryCollection {
	if err := g.Push(gs...); err != nil {
		panic(err)
	}
	return g
}
1055090
func (all *assetLruList) Init() *assetLruList {
	all.root.next = &all.root
	all.root.prev = &all.root
	all.len = 0
	return all
}
536682
func newAssetLru(maxEntries int) *assetLru {
	return &assetLru{
		maxEntries: maxEntries,
		ll:         newAssetLruList(),
		cache:      make(map[int64]*assetLruListElement),
	}
}