(c *gin.Context, object interface{})
| 84 | } |
| 85 | |
| 86 | func ObjectData(c *gin.Context, object interface{}) error { |
| 87 | if object == nil { |
| 88 | return errors.New("object is nil") |
| 89 | } |
| 90 | jsonData, err := common.Marshal(object) |
| 91 | if err != nil { |
| 92 | return fmt.Errorf("error marshalling object: %w", err) |
| 93 | } |
| 94 | return StringData(c, string(jsonData)) |
| 95 | } |
| 96 | |
| 97 | func Done(c *gin.Context) { |
| 98 | _ = StringData(c, "[DONE]") |
no test coverage detected