mirror of
https://github.com/Xevion/scla-unsubscribe.git
synced 2025-12-06 13:16:22 -06:00
Add goleveldb, comments
This commit is contained in:
7
main.go
7
main.go
@@ -9,12 +9,19 @@ import (
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
)
|
||||
|
||||
var client *http.Client
|
||||
var db *leveldb.DB
|
||||
|
||||
func init() {
|
||||
log.Logger = zerolog.New(logSplitter{}).With().Timestamp().Logger()
|
||||
db, err := leveldb.OpenFile("./cache", nil)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("Failed to open database")
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
jar, _ := cookiejar.New(nil)
|
||||
client = &http.Client{
|
||||
|
||||
Reference in New Issue
Block a user