package mongo

import "os"

// MustMongoURI returns Mongo URI from arg or MONGO_URI env (for mon/monc).
func MustMongoURI(uri string) string {
	if v := os.Getenv("MONGO_URI"); v != "" {
		return v
	}
	if uri == "" {
		panic("mongo: empty URI (set Mongo.URI or MONGO_URI)")
	}
	return uri
}
