gobstore/init.go
2025-01-12 02:51:51 -07:00

22 lines
382 B
Go

package gobstore
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,
}
}