From 794ddc792752cb472662a72d883b933a972db61a Mon Sep 17 00:00:00 2001 From: Sergey Petrov Date: Thu, 27 Mar 2025 12:06:22 +0500 Subject: [PATCH] Refactoring. --- writer/internal/ingest/rtsp/rtsp.go | 4 ++-- writer/pkg/storage/file_manager.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/writer/internal/ingest/rtsp/rtsp.go b/writer/internal/ingest/rtsp/rtsp.go index 3a1180e..6ffb386 100644 --- a/writer/internal/ingest/rtsp/rtsp.go +++ b/writer/internal/ingest/rtsp/rtsp.go @@ -33,8 +33,8 @@ func StartWriter() { } for _, link := range cams { - logger.Log.Info("process camera:", zap.String("link", link)) - log.Println("process camera: ", link) + logger.Log.Info("start process camera:", zap.String("link", link)) + log.Println("start process camera: ", link) go func() { err = rtsp(config.Local, 60, link, -1) diff --git a/writer/pkg/storage/file_manager.go b/writer/pkg/storage/file_manager.go index 03945a7..3fec197 100644 --- a/writer/pkg/storage/file_manager.go +++ b/writer/pkg/storage/file_manager.go @@ -30,8 +30,8 @@ func ReadDir(dirData string) ([]os.DirEntry, error) { } // Exists check if the file or directory exists. -func Exists(path string) bool { - _, err := os.Stat(path) +func Exists(file string) bool { + _, err := os.Stat(file) if err == nil { return true }