From 8c0064a305be1ff42e670435c554fedeaf98acf5 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 20 May 2024 00:05:33 +0200 Subject: [PATCH] cmd/initContainer: Simplify creating a daily ticker Fallout from e1635c06f3d2038097c875b7b1c293c7bc40bb1b https://github.com/containers/toolbox/pull/1494 --- src/cmd/initContainer.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/cmd/initContainer.go b/src/cmd/initContainer.go index 4074a851c..b7e44ebe2 100644 --- a/src/cmd/initContainer.go +++ b/src/cmd/initContainer.go @@ -286,13 +286,7 @@ func initContainer(cmd *cobra.Command, args []string) error { logrus.Debug("Setting up daily ticker") - daily, err := time.ParseDuration("24h") - if err != nil { - panicMsg := fmt.Sprintf("failed to parse duration: %v", err) - panic(panicMsg) - } - - tickerDaily := time.NewTicker(daily) + tickerDaily := time.NewTicker(24 * time.Hour) defer tickerDaily.Stop() logrus.Debug("Setting up watches for file system events")