MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / load

Method load

modules/storage/storage.go:153–157  ·  view source on GitHub ↗
(userId int)

Source from the content-addressed store, hash-verified

151}
152
153func (m *StorageModule) load(userId int) StorageData {
154 var data StorageData
155 m.plug.ReadIntoStruct(dataKey(userId), &data)
156 return data
157}
158
159func (m *StorageModule) save(userId int, data StorageData) {
160 m.plug.WriteStruct(dataKey(userId), data)

Callers 3

onPlayerSpawnMethod · 0.95
storageForUserMethod · 0.95

Calls 2

ReadIntoStructMethod · 0.80
dataKeyFunction · 0.70

Tested by

no test coverage detected