Skip to content

Commit

Permalink
chore: fix NPE
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <[email protected]>
  • Loading branch information
rustatian committed Sep 8, 2023
1 parent bd53f27 commit 8a14638
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c=
go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
9 changes: 2 additions & 7 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ func (p *Plugin) Init(cfg Configurer, log Logger) error {
return errors.E(op, err)
}
p.constructors = make(map[string]kv.Constructor, 5)

p.storages = make(map[string]kv.Storage, 5)

p.log = log.NamedLogger(PluginName)
// NOOP tracer
p.tracer = sdktrace.NewTracerProvider()

p.cfgPlugin = cfg
return nil
Expand All @@ -74,11 +74,6 @@ func (p *Plugin) Serve() chan error {
errCh := make(chan error, 1)
const op = errors.Op("kv_plugin_serve")

if p.tracer == nil {
// NOOP tracer
p.tracer = sdktrace.NewTracerProvider()
}

// key - storage name in the config
// value - storage
// For this config we should have 3 constructors: memory, boltdb and memcached but 4 KVs: default, boltdb-south, boltdb-north and memcached
Expand Down

0 comments on commit 8a14638

Please sign in to comment.