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

Function SetMeta

pkg/waveobj/waveobj.go:228–234  ·  view source on GitHub ↗
(waveObj WaveObj, meta map[string]any)

Source from the content-addressed store, hash-verified

226}
227
228func SetMeta(waveObj WaveObj, meta map[string]any) {
229 desc := getWaveObjDesc(waveObj.GetOType())
230 if desc == nil {
231 return
232 }
233 reflect.ValueOf(waveObj).Elem().FieldByIndex(desc.MetaField.Index).Set(reflect.ValueOf(meta))
234}
235
236func ToJsonMap(w WaveObj) (map[string]any, error) {
237 if w == nil {

Callers 1

UpdateObjectMetaFunction · 0.92

Calls 3

getWaveObjDescFunction · 0.85
GetOTypeMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected