gobstore/set.go

13 lines
224 B
Go
Raw Normal View History

2025-01-12 09:51:51 +00:00
package gobstore
// Set adds or updates a value.
func (j *GobStore[T]) Set(key string, value T) {
j.Lock()
defer j.Unlock()
j.dirty = true
j.values[key] = value
// todo := j.load()
// todo[key] = value
// j.save()
}