preset scraper added

This commit is contained in:
2024-09-10 15:57:48 +03:00
parent bfdfc634e4
commit 0ecf0ddec1
38 changed files with 790 additions and 167 deletions

View File

@@ -1,16 +1,42 @@
package main
import (
"fmt"
"time"
_ "github.com/go-sql-driver/mysql"
scraper "git.amok.space/yevhen/resource-scraper/internal"
"git.amok.space/yevhen/resource-scraper/internal/config"
)
var st time.Time
//var tokenAuth *jwtauth.JWTAuth
func init() {
st = time.Now()
scraper.ParseFlags()
config.New()
/*verifyKey := []byte(viper.GetString("jwt.sign_key"))
tokenAuth = jwtauth.New("HS256", verifyKey, nil)
// For debugging/example purposes, we generate and print
// a sample jwt token with claims `user_id:123` here:
_, tokenString, _ := tokenAuth.Encode(map[string]interface{}{"user_id": 123})
slog.Info("jwt", "token", tokenString)*/
}
func main() {
defer func() {
fmt.Printf("\nExecution took %v", time.Since(st))
}()
//a, b := runtime.GOOS
//fmt.Printf("%v - - - \n", runtime.GOOS)
scraper.Bootstrap()
//fmt.Printf("%v\n", viper.Get("23").([]interface{}))
// Кінґстонська стіна
}