From d98fd482bc85d48963f9b315ab2f4ca4fca8a53d Mon Sep 17 00:00:00 2001 From: Michele Masili Date: Sun, 18 Jul 2021 22:00:42 +0200 Subject: [PATCH] solved nullpointer --- core/commands/load_osm.go | 3 +++ core/commands/load_wof.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/core/commands/load_osm.go b/core/commands/load_osm.go index 288f488..7acc859 100644 --- a/core/commands/load_osm.go +++ b/core/commands/load_osm.go @@ -36,6 +36,9 @@ func determineOsmCols(c *utils.Config) []connectors.Column { } func (r OsmRunner) Run(c *utils.Config) error { + r.Connector = &connectors.PgConnector{ + Config: c, TableName: c.TableName, + } dbErr := r.Connector.Connect() if dbErr != nil { return dbErr diff --git a/core/commands/load_wof.go b/core/commands/load_wof.go index 1de16dd..8fc4c7d 100644 --- a/core/commands/load_wof.go +++ b/core/commands/load_wof.go @@ -51,6 +51,9 @@ func determineCols(c *utils.Config) []connectors.Column { } func (r WofRunner) Run(c *utils.Config) error { + r.Connector = &connectors.PgConnector{ + Config: c, TableName: c.TableName, + } dbErr := r.Connector.Connect() if dbErr != nil { return dbErr