MCPcopy Index your code
hub / github.com/foxcpp/maddy / modKey

Method modKey

framework/module/module_specific_data.go:25–34  ·  view source on GitHub ↗
(m Module, perInstance bool)

Source from the content-addressed store, hash-verified

23}
24
25func (msd *ModSpecificData) modKey(m Module, perInstance bool) string {
26 if !perInstance {
27 return m.Name()
28 }
29 instName := m.InstanceName()
30 if instName == "" {
31 instName = fmt.Sprintf("%x", m)
32 }
33 return m.Name() + "/" + instName
34}
35
36func (msd *ModSpecificData) MarshalJSON() ([]byte, error) {
37 msd.modDataLck.RLock()

Callers 2

SetMethod · 0.95
GetMethod · 0.95

Calls 2

NameMethod · 0.65
InstanceNameMethod · 0.65

Tested by

no test coverage detected