// MustBegin starts a new transaction using the current database connection
// pool. It will panic on error.
160379
func (db *DB) MustBegin() Transaction {
	tx, err := db.conn.Begin()
	if err != nil {
		log.Panicf(
			"aspect: failed to begin transaction: %s",
			err,
		)
	}
	return &TX{Tx: tx, dialect: db.dialect}
}
736885
func MustTransactionsToTrytes(txs Transactions) []Trytes {
	trytes := make([]Trytes, len(txs))
	for i := range txs {
		trytes[i] = MustTransactionToTrytes(&txs[i])
	}
	return trytes
}
462177
func (g *Generator) MustGenerate(length, numDigits, numSymbols int, noUpper, allowRepeat bool) string {
	res, err := g.Generate(length, numDigits, numSymbols, noUpper, allowRepeat)
	if err != nil {
		panic(err)
	}
	return res
}
1229106
func (n *NamedStmt) MustExecContext(ctx context.Context, arg interface{}) sql.Result {
	res, err := n.ExecContext(ctx, arg)
	if err != nil {
		panic(err)
	}
	return res
}
1053010
func (g *PCPGaugeVector) MustInc(inc float64, instance string) {
	if err := g.Inc(inc, instance); err != nil {
		panic(err)
	}
}
520363
func (query Query) MustPreload(record interface{}, field string) {
	must(query.Preload(record, field))
}
499495
func MustOpen(driverName, dsn string) (*DB, error) {
	db, err := Open(driverName, dsn)
	if err != nil {
		return nil, err
	}
	if err := db.sqlDB.Ping(); err != nil {
		return nil, err
	}
	return db, nil
}
250488
func (s *Stmt) MustExecContext(ctx context.Context, args ...interface{}) sql.Result {
	return MustExecContext(ctx, &qStmt{s}, "", args...)
}
56596
func MustClient(ctx context.Context) types.Client {
	return ctx.Value(ClientKey).(types.Client)
}
1036383
func MustInt(input interface{}) int64 {
	output, err := Int(input)
	if err != nil {
		panic(err)
	}
	return output
}
678410
func (ec *Envcfg) MustKey(key string) string {
	val := ec.GetKey(key)
	if val == "" {
		panic(fmt.Sprintf("key %s must be defined", key))
	}
	return val
}
871460
func Must(v interface{}, err error) interface{} {
	if err != nil {
		panic("copy error: " + err.Error())
	}

	return v
}
191504
func (c *Context) MustGet(key string) interface{} {
	if value, exists := c.Get(key); exists {
		return value
	}
	panic("Key \"" + key + "\" does not exist")
}
162997
func MustNewFrom(from interface{}, opts ...Option) *Config {
	c := New()
	if err := c.Merge(from, opts...); err != nil {
		panic(err)
	}
	return c
}
650298
func (g *Genesis) MustCommit(db ethdb.Database) *types.Block {
	block, err := g.Commit(db)
	if err != nil {
		panic(err)
	}
	return block
}
1035485
func (r *Reader) MustBytes(name string) []byte {
	s, err := r.r.Read(name)
	if err != nil {
		panic(err)
	}
	return s
}
1272815
func MustNewValue(v interface{}) *Value {
	ret, err := NewValue(v)
	if err != nil {
		panic(err)
	}
	return ret
}