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

Method WriteStruct

internal/plugins/plugins.go:435–447  ·  view source on GitHub ↗
(identifier string, in any)

Source from the content-addressed store, hash-verified

433}
434
435func (p *Plugin) WriteStruct(identifier string, in any) error {
436
437 b, err := yaml.Marshal(in)
438 if err != nil {
439 return err
440 }
441
442 if err := p.WriteBytes(identifier, b); err != nil {
443 return err
444 }
445
446 return nil
447}
448
449func (p *Plugin) ReadIntoStruct(identifier string, out any) error {
450 b, err := p.ReadBytes(identifier)

Callers 15

saveMethod · 0.80
saveMethod · 0.80
saveListConfigMethod · 0.80
onSaveMethod · 0.80
onPlayerDespawnMethod · 0.80
saveMethod · 0.80
saveMethod · 0.80
apiPatchConfigMethod · 0.80
apiAddCatchableMethod · 0.80
apiUpdateCatchableMethod · 0.80
apiDeleteCatchableMethod · 0.80

Calls 1

WriteBytesMethod · 0.95