fix: golangci-lint and gosec warnings

This commit is contained in:
2021-05-16 23:02:46 +02:00
parent f7bb283784
commit ffbc8a793c
22 changed files with 228 additions and 157 deletions

View File

@ -11,15 +11,7 @@ import (
"github.com/spf13/cobra"
)
var (
importSensors bool
importHumidities bool
importPressures bool
importTemperatures bool
)
func InitCmd(cmd *cobra.Command) error {
importCmd := &cobra.Command{
Use: "import",
Args: cobra.RangeArgs(1, 2),
@ -34,7 +26,6 @@ import sqlite3:///var/cache/flucky/sqlite3.db postgres://user:password@host:port
}
func importSources(cmd *cobra.Command, args []string) error {
configFile, err := cmd.Flags().GetString("config")
if err != nil {
return fmt.Errorf("No config file defined")