An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Fix non-constant format string in logging and error calls for go vet
Danielf98574d150d6
diff --git a/kernel/api/av.go b/kernel/api/av.goindex 4a33023cb3..69cec35b07 100644--- a/kernel/api/av.go+++ b/kernel/api/av.go@@ -1044,8 +1044,8 @@ func setAttributeViewBlockAttr(c *gin.Context) {} else if _, ok := arg["rowID"]; ok {// TODO 该参数将于 2026 年 12 月 1 日后删除msg := fmt.Sprintf("[%s] parameter [%s] is deprecated, visit [https://github.com/siyuan-note/siyuan/issues/15727] for details",- c.Request.RequestURI, "rowID")- logging.LogWarnf(msg)+ c.Request.RequestURI, "rowID")+ logging.LogWarn(msg)ret.Code = -1ret.Msg = msgreturndiff --git a/kernel/api/import.go b/kernel/api/import.goindex 289a9a3be0..ef66dbfcbc 100644--- a/kernel/api/import.go+++ b/kernel/api/import.go@@ -234,7 +234,7 @@ func importStdMd(c *gin.Context) {if gulu.File.IsSubPath(util.WorkingDir, localPath) {msg := fmt.Sprintf("import from local path [%s] failed: local path is sub path of working dir", localPath)- logging.LogErrorf(msg)+ logging.LogError(msg)ret.Code = -1ret.Msg = msgreturn@@ -242,7 +242,7 @@ func importStdMd(c *gin.Context) {if util.IsSensitivePath(localPath) {msg := fmt.Sprintf("import from local path [%s] failed: local path is sensitive path", localPath)- logging.LogErrorf(msg)+ logging.LogError(msg)ret.Code = -1ret.Msg = msgreturndiff --git a/kernel/api/router.go b/kernel/api/router.goindex 178c93b5b7..007cde8cba 100644--- a/kernel/api/router.go+++ b/kernel/api/router.go@@ -617,9 +617,9 @@ func deprecated(c *gin.Context) {ret := gulu.Ret.NewResult()defer c.JSON(http.StatusOK, ret)- msg := fmt.Sprintf("[%s] is deprecated, visit [https://github.com/siyuan-note/siyuan/issues/15727] for details",- c.Request.RequestURI)- logging.LogWarnf(msg)+ msg := fmt.Sprintf("[%s] is deprecated, visit [https://github.com/siyuan-note/siyuan/issues/15727] for details",+ c.Request.RequestURI)+ logging.LogWarn(msg)ret.Code = -1ret.Msg = msgdiff --git a/kernel/server/serve.go b/kernel/server/serve.goindex d4045902e8..547db448ab 100644--- a/kernel/server/serve.go+++ b/kernel/server/serve.go@@ -1081,7 +1081,7 @@ func serveWebDAV(ginServer *gin.Engine) {MethodLock,MethodUnlock,MethodPropPatch:- c.AbortWithError(http.StatusForbidden, fmt.Errorf(model.Conf.Language(34)))+ c.AbortWithError(http.StatusForbidden, errors.New(model.Conf.Language(34)))return}}@@ -1115,7 +1115,7 @@ func serveCalDAV(ginServer *gin.Engine) {MethodLock,MethodUnlock,MethodPropPatch:- c.AbortWithError(http.StatusForbidden, fmt.Errorf(model.Conf.Language(34)))+ c.AbortWithError(http.StatusForbidden, errors.New(model.Conf.Language(34)))return}}@@ -1149,7 +1149,7 @@ func serveCardDAV(ginServer *gin.Engine) {MethodLock,MethodUnlock,MethodPropPatch:- c.AbortWithError(http.StatusForbidden, fmt.Errorf(model.Conf.Language(34)))+ c.AbortWithError(http.StatusForbidden, errors.New(model.Conf.Language(34)))return}}