fixed tabs

This commit is contained in:
Paul Lecuq 2019-06-06 12:09:02 +02:00
parent 6f1f685e65
commit 237e737326
2 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,4 @@
{ {
"go.formatTool": "goimports" "go.formatTool": "goimports",
"editor.tabSize": 2
} }

View File

@ -2,9 +2,9 @@ package main
import ( import (
"archive/zip" "archive/zip"
"flag"
"fmt" "fmt"
"time" "time"
"flag"
_ "github.com/influxdata/influxdb1-client" _ "github.com/influxdata/influxdb1-client"
client "github.com/influxdata/influxdb1-client/v2" client "github.com/influxdata/influxdb1-client/v2"
@ -54,11 +54,10 @@ var now = time.Now()
var fpc FuelPricesConfig var fpc FuelPricesConfig
var configpath string var configpath string
func main() { func main() {
flag.StringVar(&configpath,"configfile","common.ini","config file to use with fuelprices section") flag.StringVar(&configpath, "configfile", "common.ini", "config file to use with fuelprices section")
flag.Parse() flag.Parse()
GetConfig(configpath, &fpc) GetConfig(configpath, &fpc)
sxml.Filename = fpc.RemoteFilename sxml.Filename = fpc.RemoteFilename
@ -68,18 +67,18 @@ func main() {
Username: fpc.InfluxUser, Username: fpc.InfluxUser,
Password: fpc.InfluxPass, Password: fpc.InfluxPass,
}) })
HandleFatalError(err) HandleFatalError(err)
bp, err := client.NewBatchPoints(client.BatchPointsConfig{ bp, err := client.NewBatchPoints(client.BatchPointsConfig{
Database: fpc.InfluxDB, Database: fpc.InfluxDB,
}) })
HandleFatalError(err) HandleFatalError(err)
err = DownloadFile(fpc.RemoteURL) err = DownloadFile(fpc.RemoteURL)
HandleFatalError(err) HandleFatalError(err)
err = ExtractZip() err = ExtractZip()
HandleFatalError(err) HandleFatalError(err)
GetPrices(&prices, fpc.Pos, fpc.Types, fpc.XPathBase) GetPrices(&prices, fpc.Pos, fpc.Types, fpc.XPathBase)