func MustMarshalType(v interface{}) (nt *types.Type) {
	return MustMarshalTypeOpt(v, Opt{})
}
MustMarshalType computes a Noms type from a Go type or panics if there is an
error.
package marshal
import (
	"fmt"
	"reflect"
	"github.com/attic-labs/noms/go/types"
)
func MarshalType(v interface{}) (nt *types.Type, err error) {
	return MarshalTypeOpt(v, Opt{})
}
func MarshalTypeOpt(v interface{}, opt Opt) (nt *types.Type, err error) {
	defer func() {
		if r := recover(); r != nil {
			switch r := r.(type) {
			case *UnsupportedTypeError, *InvalidTagError:
				err = r.(error)
			case *marshalNomsError:
				err = r.err
			default:
				panic(r)
			}
		}
	}()
	nt = MustMarshalTypeOpt(v, opt)
	return
}