fix(pkg/daemon): use measuredValue interface instead of different structs
This commit is contained in:
@ -7,7 +7,6 @@ import (
|
||||
"github.com/go-flucky/flucky/pkg/config"
|
||||
"github.com/go-flucky/flucky/pkg/daemon"
|
||||
"github.com/go-flucky/flucky/pkg/logger"
|
||||
"github.com/go-flucky/flucky/pkg/sensor"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@ -34,12 +33,7 @@ var daemonCmd = &cobra.Command{
|
||||
|
||||
logger := logger.NewDefaultLogger(logger.LogLevelDebug)
|
||||
|
||||
measurementUnit, err := sensor.SelectTemperatureMeasurementUnit(temperatureUnit)
|
||||
if err != nil {
|
||||
log.Fatalf("Can not parse temperature unit: %v", temperatureUnit)
|
||||
}
|
||||
|
||||
daemon.Start(cnf, duration, compression, measurementUnit, round, logger)
|
||||
daemon.Start(cnf, duration, compression, logger)
|
||||
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user