MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / GetMeta

Function GetMeta

pkg/waveobj/waveobj.go:216–226  ·  view source on GitHub ↗
(waveObj WaveObj)

Source from the content-addressed store, hash-verified

214}
215
216func GetMeta(waveObj WaveObj) MetaMapType {
217 desc := getWaveObjDesc(waveObj.GetOType())
218 if desc == nil {
219 return nil
220 }
221 mval := reflect.ValueOf(waveObj).Elem().FieldByIndex(desc.MetaField.Index).Interface()
222 if mval == nil {
223 return nil
224 }
225 return mval.(MetaMapType)
226}
227
228func SetMeta(waveObj WaveObj, meta map[string]any) {
229 desc := getWaveObjDesc(waveObj.GetOType())

Callers 2

GetMetaCommandMethod · 0.92
UpdateObjectMetaFunction · 0.92

Calls 2

getWaveObjDescFunction · 0.85
GetOTypeMethod · 0.65

Tested by

no test coverage detected