This commit is contained in:
2023-04-25 16:49:39 +08:00
parent 954eb35c16
commit e9530604cf
11 changed files with 786 additions and 150 deletions

View File

@@ -1,24 +0,0 @@
package models
import (
"database/sql"
"log"
_ "github.com/mattn/go-sqlite3"
)
type Tag struct {
ID string `json:"id"`
Name string `json:"name"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
// 使用SQLite3初始化數據庫
func init() {
db, err := sql.Open("sqlite3", "data/sqlite3/tag.db")
if err != nil {
log.Fatal(err)
}
defer db.Close()
}