From 7c296fa9b79ff0d32f39ede18a00f803929cba31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Thu, 15 Feb 2024 21:19:43 +0900 Subject: [PATCH] =?UTF-8?q?optimize(data):=20=E6=9F=A5=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data.go | 9 ++++----- radical.go | 2 +- 字.db | Bin 671744 -> 671744 bytes 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/data.go b/data.go index 8a4e3f8..8fe4095 100644 --- a/data.go +++ b/data.go @@ -109,13 +109,12 @@ func (c *Coder) 查字(ch rune, lstbuf []字表) ([]字表, []字表, error) { lstbuf = append(lstbuf, x) return nil }) - if err != nil { - c.字表缓存[ch] = nil - return nil, lstbuf, err - } if len(lstbuf) == 0 { c.字表缓存[ch] = nil - return nil, lstbuf, ErrNoSuchChar + if err == nil { + err = ErrNoSuchChar + } + return nil, lstbuf, err } lstsave := make([]字表, len(lstbuf)) copy(lstsave, lstbuf) diff --git a/radical.go b/radical.go index ea77a82..f2ebb28 100644 --- a/radical.go +++ b/radical.go @@ -49,7 +49,7 @@ var 部首后备 = map[rune]string{ '品': string(空), '龠': string(空), '冊': string(空), - '㗊': string(空), + '㗊': "💠", '舌': "👅", '干': string(空), '𧮫': string(空), diff --git a/字.db b/字.db index 5300278aa5cf5ca326a079122bfd083037d06b8e..18b8a5459cf22691c36f81810312fd21f6616df7 100644 GIT binary patch delta 227 zcmZo@&}?YXoFL8kbE1qh{h^CrK#0zSoD3_u{jz`*|vr1}Ft8^p+E4>%Q;ec%)TVF2T=OKkuE delta 135 zcmZo@&}?YXoFL8kZK8}b^;w}g?YI;^Ss}c`K52HomOa@+NCO)Bdmd$KH%nrmH%UL#a$};P4 jF-~W{z!^FH(FR8OjT4$Uw=>@2WM|vT!SzFa36}!^5+g3P