From bf09836f04552a8fd4ef0849ae55e600026ca95a Mon Sep 17 00:00:00 2001 From: Adrian Todorov Date: Sun, 7 Jan 2018 15:11:32 +0100 Subject: [PATCH] Add a default "" value for InfluxDB prefix for retrocompatibility post PR #53 --- vsphere-influxdb.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vsphere-influxdb.go b/vsphere-influxdb.go index 2d4df9f..d23d8d3 100644 --- a/vsphere-influxdb.go +++ b/vsphere-influxdb.go @@ -813,7 +813,10 @@ func main() { config.InfluxDB.Password = os.Getenv("INFLUX_PASSWORD") config.InfluxDB.Database = os.Getenv("INFLUX_DATABASE") } - + // Add a default "" value for InfluxDB prefix for retrocompatibility post PR #53 + if config.InfluxDB.Prefix == nil { + config.InfluxDB.Prefix = "" + } // Support environment variables for VSphere // Currently ony one server is supported and added to the list of vSphere servers if vhostname := os.Getenv("VSPHERE_HOSTNAME"); vhostname != "" {