upadted to 1.24.0; fixed stb and spiddped doubles in precene

This commit is contained in:
2025-03-03 09:28:41 +02:00
parent 0ecf0ddec1
commit 203f834f65
41 changed files with 1058 additions and 219 deletions

View File

@@ -1,6 +1,9 @@
package handler
import (
"reflect"
"github.com/iancoleman/strcase"
"github.com/spf13/viper"
"git.amok.space/yevhen/resource-scraper/pkg/service"
@@ -16,14 +19,13 @@ func New(services *service.Service) *Handler {
}
func (h *Handler) InitConsole() string {
switch viper.GetString(constant.CfgKeyScopeEnable) {
case constant.ScopeRuTracker:
return h.rutracker()
case constant.ScopePrescene:
return h.prescene()
}
methodName := strcase.ToCamel(viper.GetString(constant.FlagScopeEnable))
return "no scope chosen"
immutable := reflect.ValueOf(h)
method := immutable.MethodByName(methodName)
v := method.Call(nil)
return methodName + " launched, " + v[0].String() + "\n"
}
func (h *Handler) InitRoutes() string {