refactored data-types to reduce plugin sizes

This commit is contained in:
2026-06-08 07:02:56 +02:00
parent fec7cc546c
commit b6da9bcad4
90 changed files with 1039 additions and 803 deletions
+3 -2
View File
@@ -9,6 +9,7 @@ import (
"strings"
"git.portale-stac.it/go-pkg/expr/kern"
"git.portale-stac.it/go-pkg/expr/types/boolean"
)
//var globalCtx *SimpleStore
@@ -68,7 +69,7 @@ func GlobalCtrlGet(ctx kern.ExprContext, name string) (currentValue any) {
func CtrlEnable(ctx kern.ExprContext, name string) (currentStatus bool) {
name = fixCtrlVar(name)
if v, exists := ctx.GetVar(name); exists && kern.IsBool(v) {
if v, exists := ctx.GetVar(name); exists && boolean.IsBool(v) {
currentStatus, _ = v.(bool)
}
@@ -78,7 +79,7 @@ func CtrlEnable(ctx kern.ExprContext, name string) (currentStatus bool) {
func CtrlDisable(ctx kern.ExprContext, name string) (currentStatus bool) {
name = fixCtrlVar(name)
if v, exists := ctx.GetVar(name); exists && kern.IsBool(v) {
if v, exists := ctx.GetVar(name); exists && boolean.IsBool(v) {
currentStatus, _ = v.(bool)
}