From c266117785fa53cc591739e959bb5938a203316d Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Mon, 13 Jan 2020 22:45:51 +0100 Subject: [PATCH] fix(pkg/storage/logfile): remove func append - dead code --- pkg/cli/cli.go | 2 +- pkg/storage/logfile/logfile.go | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index d234e4a..3386a9a 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -86,7 +86,7 @@ func PrintSensors(cnf *config.Configuration, w io.Writer) error { } if sensor.I2CAddress != nil { - fmt.Fprintf(tw, "%v\t", *sensor.I2CAddress) + fmt.Fprintf(tw, "%v\t", string(*sensor.I2CAddress)) } else { fmt.Fprintf(tw, "\t") } diff --git a/pkg/storage/logfile/logfile.go b/pkg/storage/logfile/logfile.go index 940e55e..aca6727 100644 --- a/pkg/storage/logfile/logfile.go +++ b/pkg/storage/logfile/logfile.go @@ -7,20 +7,6 @@ import ( "github.com/go-flucky/flucky/pkg/types" ) -// Append adds an array of several measured values to a logfile -func Append(logfile Logfile, measuredValues []*types.MeasuredValue) error { - allMeasuredValues, err := logfile.Read() - if err != nil { - return err - } - allMeasuredValues = append(allMeasuredValues, measuredValues...) - err = logfile.Write(allMeasuredValues) - if err != nil { - return err - } - return nil -} - // New returns a log file with basic functions for reading and writing data. The // file extension of the logfile is taken into account to format the logfile // into the correct format.