1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 13:36:51 +02:00

Add a default "" value for InfluxDB prefix for retrocompatibility post PR #53

This commit is contained in:
Adrian Todorov 2018-01-07 15:11:32 +01:00
parent c252b28988
commit bf09836f04

View File

@ -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 != "" {