add statistics storage

This commit is contained in:
Robin Olsen
2026-01-31 21:07:09 +01:00
parent a3a1d71325
commit 4225d202bb
10 changed files with 154 additions and 24 deletions

23
main.go Normal file
View File

@@ -0,0 +1,23 @@
package main
import (
"beadstest/internal/models"
"beadstest/internal/storage"
"fmt"
"os"
"time"
"github.com/google/uuid"
)
func main() {
statStore := storage.NewJsonStorage("./.pm/test.json", &models.Statistics{
ID: uuid.New(),
StartTime: time.Now(),
})
if err := statStore.Init(); err != nil {
fmt.Println("Error:", err)
os.Exit(1)
}
}