1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-14 11:23:02 +02:00

Updated default driver registration

This commit is contained in:
Tim Voronov 2019-02-21 13:04:38 -05:00
parent 25f3ef0646
commit 2be0d471ac

View File

@ -35,6 +35,11 @@ func WithContext(ctx context.Context, drv Driver, opts ...Option) context.Contex
opt(drv, value.opts)
}
// set first registered driver as a default one
if value.opts.defaultDriver == "" {
value.opts.defaultDriver = drv.Name()
}
return ctx
}