♻️ Clean code

This commit is contained in:
Daniel 2024-03-10 23:27:13 +08:00
parent 9c512960bc
commit f3574038e2
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
28 changed files with 160 additions and 130 deletions

View file

@ -52,7 +52,7 @@ import (
)
func DocImageAssets(rootID string) (ret []string, err error) {
tree, err := loadTreeByBlockID(rootID)
tree, err := LoadTreeByBlockID(rootID)
if nil != err {
return
}
@ -75,7 +75,7 @@ func DocImageAssets(rootID string) (ret []string, err error) {
}
func NetImg2LocalAssets(rootID, originalURL string) (err error) {
tree, err := loadTreeByBlockID(rootID)
tree, err := LoadTreeByBlockID(rootID)
if nil != err {
return
}
@ -227,7 +227,7 @@ func NetImg2LocalAssets(rootID, originalURL string) (err error) {
}
func NetAssets2LocalAssets(rootID string) (err error) {
tree, err := loadTreeByBlockID(rootID)
tree, err := LoadTreeByBlockID(rootID)
if nil != err {
return
}
@ -515,7 +515,7 @@ func UploadAssets2Cloud(rootID string) (count int, err error) {
return
}
tree, err := loadTreeByBlockID(rootID)
tree, err := LoadTreeByBlockID(rootID)
if nil != err {
return
}
@ -1071,7 +1071,7 @@ func assetsLinkDestsInQueryEmbedNodes(tree *parse.Tree) (ret []string) {
stmt = strings.ReplaceAll(stmt, editor.IALValEscNewLine, "\n")
sqlBlocks := sql.SelectBlocksRawStmt(stmt, 1, Conf.Search.Limit)
for _, sqlBlock := range sqlBlocks {
subtree, _ := loadTreeByBlockID(sqlBlock.ID)
subtree, _ := LoadTreeByBlockID(sqlBlock.ID)
if nil == subtree {
continue
}