chore: update deps

This commit is contained in:
源文雨
2024-11-07 00:12:51 +09:00
parent f5e1c197dd
commit 83ca8c344b
57 changed files with 274 additions and 300 deletions

View File

@@ -11,11 +11,11 @@ type emoji struct {
Emoji string `db:"emoji"`
}
var db = &sql.Sqlite{}
var db sql.Sqlite
func getPinyinByWord(word string) string {
var p pinyin
_ = db.Find("pinyin", &p, "where word = '"+word+"'")
_ = db.Find("pinyin", &p, "WHERE word = ?", word)
return p.Pronun
}
@@ -25,6 +25,6 @@ func getPronunByDWord(w0, w1 rune) string {
func getEmojiByPronun(pronun string) string {
var e emoji
_ = db.Find("emoji", &e, "where pronunciation = '"+pronun+"'")
_ = db.Find("emoji", &e, "WHERE pronunciation = ?", pronun)
return e.Emoji
}