From 2be0d471acc09660f665b5fd2bbf07da39acf2f4 Mon Sep 17 00:00:00 2001 From: Tim Voronov Date: Thu, 21 Feb 2019 13:04:38 -0500 Subject: [PATCH] Updated default driver registration --- pkg/drivers/driver.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/drivers/driver.go b/pkg/drivers/driver.go index 21919824..c964ef97 100644 --- a/pkg/drivers/driver.go +++ b/pkg/drivers/driver.go @@ -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 }