preset scraper added
This commit is contained in:
26
cmd/main.go
26
cmd/main.go
@@ -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{}))
|
||||
// Кінґстонська стіна
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user