🎨 优化目录结构

This commit is contained in:
fumiama
2022-02-25 22:15:14 +08:00
parent 5ccf753af3
commit 0cfb2e4e06
101 changed files with 116 additions and 116 deletions

24
plugin/omikuji/model.go Normal file
View File

@@ -0,0 +1,24 @@
package omikuji
import (
"strconv"
sql "github.com/FloatTech/sqlite"
)
type kuji struct {
ID uint8 `db:"id"`
Text string `db:"text"`
}
var db = &sql.Sqlite{}
// 返回一个解签
func getKujiByBango(id uint8) string {
var s kuji
err := db.Find("kuji", &s, "where id = "+strconv.Itoa(int(id)))
if err != nil {
return err.Error()
}
return s.Text
}