sjson_write支持删除数据

This commit is contained in:
zhangdeman committed 2025-05-06 15:42:24 +08:00
1 parent c7ce590e3b
commit 691bee91a5
2 files changed
+12

No files matched your search

+10
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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.