2019-06-22 12:38:58 +00:00
|
|
|
package temperature
|
|
|
|
|
2019-06-25 20:56:09 +00:00
|
|
|
// var compressTemperatureCmd = &cobra.Command{
|
|
|
|
// Use: "compress",
|
|
|
|
// Short: "Compress temperature logfiles",
|
|
|
|
// Args: cobra.ExactArgs(1),
|
|
|
|
// Example: `flucky temperature compress /var/log/flucky/temperature.json
|
|
|
|
// flucky temperature compress /var/log/flucky/temperature.xml`,
|
|
|
|
// Run: func(cmd *cobra.Command, args []string) {
|
2019-06-22 12:38:58 +00:00
|
|
|
|
2019-06-25 20:56:09 +00:00
|
|
|
// temperatureLogfile := logfile.New(args[0])
|
|
|
|
// temperatures, err := temperatureLogfile.ReadTemperatures()
|
|
|
|
// if err != nil {
|
|
|
|
// log.Fatalln(err)
|
|
|
|
// }
|
2019-06-22 12:38:58 +00:00
|
|
|
|
2019-06-25 20:56:09 +00:00
|
|
|
// temperatures = logfile.CompressTemperature(temperatures)
|
2019-06-22 12:38:58 +00:00
|
|
|
|
2019-06-25 20:56:09 +00:00
|
|
|
// err = temperatureLogfile.WriteTemperatures(temperatures)
|
|
|
|
// if err != nil {
|
|
|
|
// log.Fatalln(err)
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// }
|
2019-06-22 12:38:58 +00:00
|
|
|
|
2019-06-25 20:56:09 +00:00
|
|
|
// func init() {
|
|
|
|
// temperatureCmd.AddCommand(compressTemperatureCmd)
|
|
|
|
// }
|