gobstore/init.go

23 lines
382 B
Go
Raw Permalink Normal View History

2024-12-29 10:40:06 +00:00
package gobstore
2025-01-12 09:51:51 +00:00
import (
"sync"
)
// parent type
type GobStore[T any] struct {
sync.Mutex
path string
values map[string]T
dirty bool
ROOT_DATA_PATH string
}
// NewStore creates a new object
func NewStore[T any](ROOT_DATA_PATH string, path string) GobStore[T] {
return GobStore[T]{
path: path,
ROOT_DATA_PATH: ROOT_DATA_PATH,
}
}