diff --git a/README.md b/README.md index 598a7f6..eb30d5e 100644 --- a/README.md +++ b/README.md @@ -99,12 +99,9 @@ #### 编译 -本项目的编译基于go1.17+ - -此外,还需要64位的gcc,以保证cgo依赖包正常编译,若未安装64位gcc,可以从这里下载安装:http://tdm-gcc.tdragon.net/ +本项目使用纯Go语言实现,编译基于go1.17+ ```bash -# 开启CGO后 go build ./cmd/main.go ``` diff --git a/go.mod b/go.mod index f76c97d..98c7b93 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/chromedp/chromedp v0.7.6 github.com/fogleman/gg v1.3.0 github.com/fsnotify/fsnotify v1.5.1 + github.com/glebarez/sqlite v1.3.5 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible github.com/robfig/cron/v3 v3.0.1 @@ -22,7 +23,6 @@ require ( golang.org/x/time v0.0.0-20191024005414-555d28b269f0 gorm.io/driver/mysql v1.3.2 gorm.io/driver/postgres v1.3.1 - gorm.io/driver/sqlite v1.3.1 gorm.io/gorm v1.23.1 ) @@ -31,12 +31,14 @@ require ( github.com/andybalholm/cascadia v1.3.1 // indirect github.com/chromedp/cdproto v0.0.0-20211126220118-81fa0469ad77 // indirect github.com/chromedp/sysutil v1.0.0 // indirect + github.com/glebarez/go-sqlite v1.14.7 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-sql-driver/mysql v1.6.0 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect github.com/gobwas/ws v1.1.0 // indirect github.com/golang/snappy v0.0.3 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect @@ -55,10 +57,11 @@ require ( github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.5 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-sqlite3 v1.14.9 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect github.com/mitchellh/mapstructure v1.4.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.8.1 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/spf13/afero v1.6.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect @@ -73,4 +76,8 @@ require ( golang.org/x/text v0.3.7 // indirect gopkg.in/ini.v1 v1.63.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + modernc.org/libc v1.14.3 // indirect + modernc.org/mathutil v1.4.1 // indirect + modernc.org/memory v1.0.5 // indirect + modernc.org/sqlite v1.14.5 // indirect ) diff --git a/manager/manager.go b/manager/manager.go index 52b493c..8a27a9a 100644 --- a/manager/manager.go +++ b/manager/manager.go @@ -17,9 +17,10 @@ import ( "github.com/syndtr/goleveldb/leveldb" levelopt "github.com/syndtr/goleveldb/leveldb/opt" zero "github.com/wdvxdr1123/ZeroBot" + + "github.com/glebarez/sqlite" "gorm.io/driver/mysql" "gorm.io/driver/postgres" - "gorm.io/driver/sqlite" "gorm.io/gorm" "gorm.io/gorm/schema" )