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: Clean code
Liang Ding18ad07d2f45c
diff --git a/kernel/util/sort.go b/kernel/util/sort.goindex 170598bf88..19a91401c6 100644--- a/kernel/util/sort.go+++ b/kernel/util/sort.go@@ -39,13 +39,13 @@ func PinYinCompare(str1, str2 string) bool {return true}-// UTF82GBK : transform UTF8 rune into GBK byte array+// UTF82GBK transform UTF8 rune into GBK byte array.func UTF82GBK(src string) ([]byte, error) {GB18030 := simplifiedchinese.All[0]return io.ReadAll(transform.NewReader(bytes.NewReader([]byte(src)), GB18030.NewEncoder()))}-// GBK2UTF8 : transform GBK byte array into UTF8 string+// GBK2UTF8 transform GBK byte array into UTF8 string.func GBK2UTF8(src []byte) (string, error) {GB18030 := simplifiedchinese.All[0]bytes, err := io.ReadAll(transform.NewReader(bytes.NewReader(src), GB18030.NewDecoder()))