feat(cmd/compression): new subcommand to compress logfiles

This commit is contained in:
volker.raschek committed 2019-07-02 22:47:28 +02:00
1 parent 572ad7fdde
commit 96eb1f4036
3 files changed
+42 -28

No files matched your search

-28
View File
@@ -1,28 +0,0 @@
package temperature
// 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) {
// temperatureLogfile := logfile.New(args[0])
// temperatures, err := temperatureLogfile.ReadTemperatures()
// if err != nil {
// log.Fatalln(err)
// }
// temperatures = logfile.CompressTemperature(temperatures)
// err = temperatureLogfile.WriteTemperatures(temperatures)
// if err != nil {
// log.Fatalln(err)
// }
// },
// }
// func init() {
// temperatureCmd.AddCommand(compressTemperatureCmd)
// }