diff --git a/internal/storage/file.go b/internal/storage/file.go index 6ae2e15..78583f0 100644 --- a/internal/storage/file.go +++ b/internal/storage/file.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "os" - "sync" "time" "github.com/ex0rcist/metflix/internal/logging" @@ -16,7 +15,6 @@ var _ MetricsStorage = (*FileStorage)(nil) type FileStorage struct { *MemStorage - sync.Mutex storePath string storeInterval int @@ -60,7 +58,6 @@ func (s *FileStorage) Push(id string, record Record) error { func (s *FileStorage) Close() error { if s.dumpTicker != nil { - fmt.Println("stopping ticker") s.dumpTicker.Stop() } diff --git a/internal/storage/file_test.go b/internal/storage/file_test.go index 948b139..4da3299 100644 --- a/internal/storage/file_test.go +++ b/internal/storage/file_test.go @@ -2,7 +2,6 @@ package storage import ( "encoding/json" - "fmt" "os" "testing" "time" @@ -56,7 +55,6 @@ func TestSyncPushAndDump(t *testing.T) { data, err := os.ReadFile(storePath) checkNoError(t, err, "failed to read storage file") - fmt.Println(string(data)) err = json.Unmarshal(data, &fs.MemStorage) checkNoError(t, err, "failed to unmarshal storage file")