sjson_write支持删除数据

This commit is contained in:
2025-05-06 15:42:24 +08:00
parent c7ce590e3b
commit 691bee91a5
2 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,16 @@ type SjsonWrite struct {
l *sync.RWMutex
}
func (s *SjsonWrite) Delete(dataPath string) error {
var (
err error
)
if s.res, err = sjson.Delete(s.res, dataPath); nil != err {
return err
}
return nil
}
func (s *SjsonWrite) Set(dataPath string, data any) error {
var (
err error