MCPcopy Create free account
hub / github.com/53AI/53AIHub / SetDataMap

Method SetDataMap

api/model/message_process_step.go:28–39  ·  view source on GitHub ↗

SetDataMap 设置 Data 字段(JSON 序列化)

(v map[string]interface{})

Source from the content-addressed store, hash-verified

26
27// SetDataMap 设置 Data 字段(JSON 序列化)
28func (m *MessageProcessStep) SetDataMap(v map[string]interface{}) error {
29 if len(v) == 0 {
30 m.Data = ""
31 return nil
32 }
33 b, err := json.Marshal(v)
34 if err != nil {
35 return err
36 }
37 m.Data = string(b)
38 return nil
39}
40
41// GetDataMap 读取 Data 字段(JSON 反序列化)
42func (m *MessageProcessStep) GetDataMap() (map[string]interface{}, error) {

Callers 2

saveProcessStepRecordFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected