12 lines
224 B
Go
12 lines
224 B
Go
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()
|
|
}
|