🎨 Use single-line to save doc sort conf

This commit is contained in:
Daniel 2023-07-15 23:01:47 +08:00
parent ab705cc5f8
commit 12cd152a6f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 4 additions and 4 deletions

View file

@ -211,7 +211,7 @@ func ParseAttributeView(avID string) (ret *AttributeView, err error) {
}
func SaveAttributeView(av *AttributeView) (err error) {
data, err := gulu.JSON.MarshalIndentJSON(av, "", "\t")
data, err := gulu.JSON.MarshalIndentJSON(av, "", "\t") // TODO: single-line for production
if nil != err {
logging.LogErrorf("marshal attribute view [%s] failed: %s", av.ID, err)
return

View file

@ -1574,7 +1574,7 @@ func moveSorts(rootID, fromBox, toBox string) {
toFullSortIDs[id] = sortVal
}
data, err := gulu.JSON.MarshalIndentJSON(toFullSortIDs, "", " ")
data, err := gulu.JSON.MarshalJSON(toFullSortIDs)
if nil != err {
logging.LogErrorf("marshal sort conf failed: %s", err)
return
@ -1649,7 +1649,7 @@ func ChangeFileTreeSort(boxID string, paths []string) {
fullSortIDs[sortID] = sortVal
}
data, err = gulu.JSON.MarshalIndentJSON(fullSortIDs, "", " ")
data, err = gulu.JSON.MarshalJSON(fullSortIDs)
if nil != err {
logging.LogErrorf("marshal sort conf failed: %s", err)
return
@ -1708,7 +1708,7 @@ func (box *Box) removeSort(ids []string) {
delete(fullSortIDs, toRemove)
}
data, err = gulu.JSON.MarshalIndentJSON(fullSortIDs, "", " ")
data, err = gulu.JSON.MarshalJSON(fullSortIDs)
if nil != err {
logging.LogErrorf("marshal sort conf failed: %s", err)
return