Преглед изворни кода

SVI Упрощение дженериков под интерфейсы (меньше гемора)

SVI пре 2 недеља
родитељ
комит
4108a4280b
43 измењених фајлова са 147 додато и 164 уклоњено
  1. 2 2
      v4/.golangci.yml
  2. 1 1
      v4/kern.go
  3. 1 1
      v4/lev0/etypes/etypes.go
  4. 1 1
      v4/lev0/ktypes/estr.go
  5. 0 1
      v4/lev0/ktypes/ioption.go
  6. 3 3
      v4/lev0/ktypes/iresult.go
  7. 0 1
      v4/lev0/ktypes/isafe_bool.go
  8. 0 1
      v4/lev0/ktypes/itypes.go
  9. 1 1
      v4/lev0/lev0.go
  10. 6 6
      v4/lev0/option/option.go
  11. 1 1
      v4/lev0/option/option_test.go
  12. 1 1
      v4/lev0/result/result_test.go
  13. 2 4
      v4/lev0/voc/voc.go
  14. 1 1
      v4/lev1/ctx_value/ctx_value.go
  15. 2 2
      v4/lev1/local_ctx/local_ctx.go
  16. 1 1
      v4/lev1/local_ctx/local_ctx_test.go
  17. 12 12
      v4/lev1/log_buf/log_buf.go
  18. 3 3
      v4/lev1/log_dict_topic/log_dict_topic.go
  19. 6 6
      v4/lev1/log_msg/log_msg.go
  20. 16 16
      v4/lev1/lst_sort/lst_sort.go
  21. 13 13
      v4/lev1/mock_env/mock_env.go
  22. 3 3
      v4/lev2/kbus/dict_sub_hook/dict_sub_hook.go
  23. 3 3
      v4/lev2/kbus/dict_topic_sub/dict_topic_sub.go
  24. 2 3
      v4/lev2/kbus_base/kbus_base.go
  25. 10 14
      v4/lev2/kbus_base/kbus_base_test.go
  26. 1 1
      v4/lev2/kbus_http/client_bus_http/client_bus_http_test.go
  27. 1 1
      v4/lev2/kbus_local/client_bus_local/client_bus_local_test.go
  28. 1 1
      v4/lev2/kbus_local/kbus_local.go
  29. 1 1
      v4/lev2/kbus_local/kbus_local_test.go
  30. 3 3
      v4/lev2/kernel_keeper/kernel_keeper.go
  31. 3 5
      v4/lev2/kmodule/kmodule.go
  32. 3 3
      v4/lev2/kmonolit/kmonolit.go
  33. 10 11
      v4/lev2/kmonolit/kmonolit_test.go
  34. 7 7
      v4/lev2/kserv_http/kserv_http_test.go
  35. 2 2
      v4/lev2/kstore_kv/kstore_kv.go
  36. 4 8
      v4/lev2/kstore_kv_std/kv_bucket_base/kv_bucket_base.go
  37. 1 1
      v4/lev2/wui/wui_button/wui_button.go
  38. 5 5
      v4/lev3/mod_kctx/mod_kctx_test.go
  39. 5 5
      v4/lev3/mod_keeper/mod_keeper_test.go
  40. 1 1
      v4/lev3/mod_serv_http/btn_modules/btn_modules.go
  41. 2 2
      v4/lev3/mod_serv_http/http_api/http_api_test.go
  42. 3 3
      v4/lev3/mod_serv_http/page_monolit/page_monolit.go
  43. 3 3
      v4/lev3/mod_wui/mod_wui_test.go

+ 2 - 2
v4/.golangci.yml

@@ -8,7 +8,7 @@ linters:
    - dupl
    - forbidigo
    - funlen
-   - gocheckcompilerdirectives
+   #- gocheckcompilerdirectives
    - gocognit
    - goconst
    - gocritic
@@ -27,7 +27,7 @@ linters:
    - unconvert
    - unparam
    - usestdlibvars
-   - wrapcheck
+   #- wrapcheck
    #- wsl
 
 issues:

+ 1 - 1
v4/kern.go

@@ -114,7 +114,7 @@ func GetMonolitHttp(name string) mKt.IKernelMonolit {
 }
 
 // NewKernelModule -- возвращает новый модуль на ядре.
-func NewKernelModule(name *mKa.AModuleName)mKt.IKernelModule {
+func NewKernelModule(name *mKa.AModuleName) mKt.IKernelModule {
 	resMod := kmodule.NewKernelModule(name)
 	return resMod
 }

+ 1 - 1
v4/lev0/etypes/etypes.go

@@ -43,4 +43,4 @@ func StrNew(opt ...FnOptStr) EStr {
 // StrMutNew -- возвращает новую расширенную строку с признаком мутабельности.
 func StrMutNew(opt ...FnOptStr) EStrMut {
 	return estr.StrMutNew(opt...)
-}
+}

+ 1 - 1
v4/lev0/ktypes/estr.go

@@ -13,4 +13,4 @@ type EStrMut interface {
 	EStr
 	// Set -- устанавливает строку.
 	Set(string)
-}
+}

+ 0 - 1
v4/lev0/ktypes/ioption.go

@@ -17,4 +17,3 @@ type IOption[T any] interface {
 	// Assert -- проверяет, что нет ошибки (с паникой только на локальном стенде).
 	Assert(msgFormat string, args ...any) T
 }
-

+ 3 - 3
v4/lev0/ktypes/iresult.go

@@ -7,7 +7,7 @@ type IResult[T any] interface {
 	// IsErr -- возвращает true, если Result содержит ошибку.
 	IsErr() bool
 	// Ok -- возвращает значение, если оно есть, иначе паникует.
-	Ok()T
+	Ok() T
 	// OkOr -- возвращает значение, если оно есть, или значение по умолчанию.
 	OkOr(defaultValue T) T
 	// OkOrFn -- возвращает значение, если оно есть, или результат выполнения функции.
@@ -15,9 +15,9 @@ type IResult[T any] interface {
 	// Err -- возвращает ошибку, если она есть.
 	Err() error
 	// Error -- возвращает строковое представление ошибки, если она есть.
-	Error()string
+	Error() string
 	// Hassert -- проверяет, что нет ошибки (с паникой).
 	Hassert(msgFormat string, args ...any) T
 	// Assert -- проверяет, что нет ошибки (с паникой только на локальном стенде).
 	Assert(msgFormat string, args ...any) T
-}
+}

+ 0 - 1
v4/lev0/ktypes/isafe_bool.go

@@ -13,4 +13,3 @@ type ISafeBool interface {
 	// Getenv -- устанавливает значение из окружения
 	Getenv(string) IResult[bool]
 }
-

+ 0 - 1
v4/lev0/ktypes/itypes.go

@@ -1,3 +1,2 @@
 // package ktypes -- типы ядра
 package ktypes
-

+ 1 - 1
v4/lev0/lev0.go

@@ -95,4 +95,4 @@ func Assert(isCond bool, msgFormat string, args ...any) {
 // SleepMs -- задержка в миллисекундах.
 func SleepMs() {
 	helpers.SleepMs()
-}
+}

+ 6 - 6
v4/lev0/option/option.go

@@ -3,7 +3,7 @@ package option
 import (
 	"reflect"
 
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
+	mH "gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
 	mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 )
 
@@ -18,7 +18,7 @@ func NewSome[T any](value T) mKt.IOption[T] {
 	v := reflect.ValueOf(value)
 	switch v.Kind() {
 	case reflect.Ptr, reflect.Slice, reflect.Map, reflect.Chan, reflect.Func, reflect.Interface:
-		Hassert(!v.IsNil(), "NewSome[T any](): value==nil")
+		mH.Hassert(!v.IsNil(), "NewSome[T any](): value==nil")
 	}
 	sf := &Option[T]{some: &value}
 	return sf
@@ -43,7 +43,7 @@ func (sf *Option[T]) IsNone() bool {
 
 // Some - извлекает значение (паника, если None).
 func (sf *Option[T]) Some() T {
-	Hassert(sf.some != nil, "Option[T].Some(): val==nil!")
+	mH.Hassert(sf.some != nil, "Option[T].Some(): val==nil!")
 	return *sf.some
 }
 
@@ -57,7 +57,7 @@ func (sf Option[T]) SomeOr(defaultValue T) T {
 
 // SomeOrFn -- возвращает значение, если оно есть, или результат выполнения функции.
 func (sf *Option[T]) SomeOrFn(fn func() T) T {
-	Hassert(fn != nil, "Option[T].SomeOrFn(): fn==nil")
+	mH.Hassert(fn != nil, "Option[T].SomeOrFn(): fn==nil")
 	if sf.some == nil {
 		return fn()
 	}
@@ -66,12 +66,12 @@ func (sf *Option[T]) SomeOrFn(fn func() T) T {
 
 // Hassert -- проверяет, что не пустое значение (с паникой).
 func (sf *Option[T]) Hassert(msgFormat string, args ...any) T {
-	Hassert(sf.some != nil, msgFormat, args...)
+	mH.Hassert(sf.some != nil, msgFormat, args...)
 	return *sf.some
 }
 
 // Assert -- проверяет, что нет ошибки (с паникой только на локальном стенде).
 func (sf *Option[T]) Assert(msgFormat string, args ...any) T {
-	Assert(sf.some != nil, msgFormat, args...)
+	mH.Assert(sf.some != nil, msgFormat, args...)
 	return *sf.some
 }

+ 1 - 1
v4/lev0/option/option_test.go

@@ -47,7 +47,7 @@ func (sf *testerOption) createNoneGood1() {
 	if val := opt.SomeOrFn(sf.fnWrap2); val != "test5" {
 		sf.t.Fatalf("createNoneGood1(): val bad")
 	}
-	_opt:=opt.(*Option[string])
+	_opt := opt.(*Option[string])
 	sf.unwrapErr(_opt)
 	sf.hassert(_opt)
 	sf.assert(_opt)

+ 1 - 1
v4/lev0/result/result_test.go

@@ -38,7 +38,7 @@ func (sf *tester) notCheck() {
 	}
 	runtime.Gosched()
 	runtime.GC()
-	_res:=res.(*Result[string])
+	_res := res.(*Result[string])
 	_res.destroy(_res)
 }
 

+ 2 - 4
v4/lev0/voc/voc.go

@@ -2,10 +2,9 @@
 package voc
 
 import (
-	mKt 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
+	mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/voc/etime"
-
 )
 
 // NewETime -- создать новую метку времени.
@@ -22,10 +21,9 @@ func NewETimeAuto() mKt.ITime {
 	return etime.NewETimeAuto()
 }
 
-
 // NewETimeAutoMut -- создать новую фиксированную авто-метку
 //
 //go:fix inline
 func NewETimeAutoMut() mKt.ITimeMut {
 	return etime.NewETimeAutoMut()
-}
+}

+ 1 - 1
v4/lev1/ctx_value/ctx_value.go

@@ -21,7 +21,7 @@ type CtxValue struct {
 
 // NewCtxValue -- возвращает новое потокобезопасное значение локального контекста.
 func NewCtxValue(key string, val any, comment string) mKt.ICtxValue {
-	mL0.Hassert(key!="", "NewCtxValue(): key is empty")
+	mL0.Hassert(key != "", "NewCtxValue(): key is empty")
 	sf := &CtxValue{
 		key:       key,
 		createAt:  voc.NewETimeAuto(),

+ 2 - 2
v4/lev1/local_ctx/local_ctx.go

@@ -26,14 +26,14 @@ type LocalCtx struct {
 
 // NewLocalCtx -- возвращает новый локальный контекст.
 func NewLocalCtx(ctx context.Context) mKt.ILocalCtx {
-	mL0.Hassert(ctx!=nil, "NewLocalCtx(): ctx==nil")
+	mL0.Hassert(ctx != nil, "NewLocalCtx(): ctx==nil")
 	_ctx, fnCancel := context.WithCancel(ctx)
 	sf := &LocalCtx{
 		ctx:      _ctx,
 		fnCancel: fnCancel,
 		dictVal:  map[string]mKt.ICtxValue{},
 		lstSort:  lst_sort.NewLstSort(),
-		log:      log_buf.NewLogBuf(
+		log: log_buf.NewLogBuf(
 			log_buf.OptIsTerm(true),
 			log_buf.OptPrefix("LocalCtx")),
 	}

+ 1 - 1
v4/lev1/local_ctx/local_ctx_test.go

@@ -6,7 +6,7 @@ import (
 )
 
 type tester struct {
-	t   *testing.T
+	t    *testing.T
 	lCtx *LocalCtx
 }
 

+ 12 - 12
v4/lev1/log_buf/log_buf.go

@@ -7,7 +7,7 @@ import (
 	"sync"
 
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
+	mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev1/log_msg"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev1/safe_bool"
 )
@@ -15,10 +15,10 @@ import (
 // LogBuf -- потокобезопасный буфер лога.
 type LogBuf struct {
 	sync.RWMutex
-	isTerm ISafeBool // Признак вывода в стандартный поток
-	prefix string    // Префикс для сообщений
-	lst    []ILogMsg
-	lstErr []ILogMsg
+	isTerm mKt.ISafeBool // Признак вывода в стандартный поток
+	prefix string        // Префикс для сообщений
+	lst    []mKt.ILogMsg
+	lstErr []mKt.ILogMsg
 }
 
 // OptionLogBuf -- опция для конфигурирования ILogBuf.
@@ -41,11 +41,11 @@ func OptPrefix(prefix string) OptionLogBuf {
 }
 
 // NewLogBuf -- возвращает новый потокобезопасный буфер лога.
-func NewLogBuf(opts ...OptionLogBuf) ILogBuf {
+func NewLogBuf(opts ...OptionLogBuf) mKt.ILogBuf {
 	sf := &LogBuf{
 		isTerm: safe_bool.NewSafeBool(),
-		lst:    []ILogMsg{},
-		lstErr: []ILogMsg{},
+		lst:    []mKt.ILogMsg{},
+		lstErr: []mKt.ILogMsg{},
 	}
 
 	for _, opt := range opts {
@@ -55,12 +55,12 @@ func NewLogBuf(opts ...OptionLogBuf) ILogBuf {
 }
 
 // IsTerm -- возвращает признак логирования.
-func (sf *LogBuf) IsTerm() ISafeBool {
+func (sf *LogBuf) IsTerm() mKt.ISafeBool {
 	return sf.isTerm
 }
 
 // GetErr -- возвращает сообщение ошибки по номеру.
-func (sf *LogBuf) GetErr(num int) ILogMsg {
+func (sf *LogBuf) GetErr(num int) mKt.ILogMsg {
 	sf.RLock()
 	defer sf.RUnlock()
 	if len(sf.lstErr) == 0 {
@@ -76,7 +76,7 @@ func (sf *LogBuf) GetErr(num int) ILogMsg {
 }
 
 // Get -- возвращает сообщение по номеру.
-func (sf *LogBuf) Get(num int) ILogMsg {
+func (sf *LogBuf) Get(num int) mKt.ILogMsg {
 	sf.RLock()
 	defer sf.RUnlock()
 	if len(sf.lst) == 0 {
@@ -180,7 +180,7 @@ func (sf *LogBuf) checkLenErr() {
 }
 
 // Печатает сообщение в терминал, если разрешено.
-func (sf *LogBuf) printTerm(msg ILogMsg) {
+func (sf *LogBuf) printTerm(msg mKt.ILogMsg) {
 	if !sf.isTerm.Get() {
 		return
 	}

+ 3 - 3
v4/lev1/log_dict_topic/log_dict_topic.go

@@ -7,17 +7,17 @@ import (
 
 	mL0 "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
+	mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 )
 
 type LogDictTopic struct {
 	sync.RWMutex
 	dict   map[alias.ATopic]bool
-	client IBusClient
+	client mKt.IBusClient
 }
 
 // NewLogDictTopic -- возвращает новый словарь топиков для логирования.
-func NewLogDictTopic(clientBus IBusClient) mL0.IResult[*LogDictTopic] {
+func NewLogDictTopic(clientBus mKt.IBusClient) mL0.IResult[*LogDictTopic] {
 	if clientBus == nil {
 		err := fmt.Errorf("NewLogDictTopic(): clientBus == nil")
 		return mL0.NewErr[*LogDictTopic](err)

+ 6 - 6
v4/lev1/log_msg/log_msg.go

@@ -4,7 +4,7 @@ package log_msg
 import (
 	"fmt"
 
-	mH "gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
+	mL0 "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/quark"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/quark/quark_val"
@@ -60,14 +60,14 @@ func (sf *logMsg) CreateAt() ktypes.ITime {
 func (sf *logMsg) check(level int) {
 	switch level {
 	case DEBUG:
-		quark_val.Set(sf.level.QBase.Val(), "DEBU")
+		quark_val.Set(sf.level.Val(), "DEBU")
 	case INFO:
-		quark_val.Set(sf.level.QBase.Val(), "INFO")
+		quark_val.Set(sf.level.Val(), "INFO")
 	case WARN:
-		quark_val.Set(sf.level.QBase.Val(), "WARN")
+		quark_val.Set(sf.level.Val(), "WARN")
 	case ERROR:
-		quark_val.Set(sf.level.QBase.Val(), "ERRO")
+		quark_val.Set(sf.level.Val(), "ERRO")
 	default:
-		mH.Hassert(false, "logMsg.check(): unknown level(%v)", level)
+		mL0.Hassert(false, "logMsg.check(): unknown level(%v)", level)
 	}
 }

+ 16 - 16
v4/lev1/lst_sort/lst_sort.go

@@ -5,35 +5,35 @@ import (
 	"sort"
 	"sync"
 
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
+	mL0 "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
+	mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 )
 
 // LstSort -- сортированный список значений контекста.
 type LstSort struct {
 	sync.RWMutex
-	lstVal []ICtxValue // Сортированный список значений
+	lstVal []mKt.ICtxValue // Сортированный список значений
 }
 
 // NewLstSort -- возвращает новый сортированный список значений контекста.
 func NewLstSort() *LstSort {
 	sf := &LstSort{
-		lstVal: []ICtxValue{},
+		lstVal: []mKt.ICtxValue{},
 	}
 	return sf
 }
 
 // Add -- добавляет значение в список.
-func (sf *LstSort) Add(val ICtxValue) {
+func (sf *LstSort) Add(val mKt.ICtxValue) {
 	sf.Lock()
 	defer sf.Unlock()
-	Hassert(val != nil, "LstSort.Add(): ICtxValue==nil")
+	mL0.Hassert(val != nil, "LstSort.Add(): ICtxValue==nil")
 	sf.lstVal = append(sf.lstVal, val)
 	sf.sort()
 }
 
 // Del -- удаляет элемент из списка.
-func (sf *LstSort) Del(val ICtxValue) {
+func (sf *LstSort) Del(val mKt.ICtxValue) {
 	sf.Lock()
 	defer sf.Unlock()
 	if val == nil {
@@ -43,7 +43,7 @@ func (sf *LstSort) Del(val ICtxValue) {
 }
 
 // List -- возвращает сортированный список.
-func (sf *LstSort) List() []ICtxValue {
+func (sf *LstSort) List() []mKt.ICtxValue {
 	sf.RLock()
 	defer sf.RUnlock()
 	return sf.list()
@@ -57,19 +57,19 @@ func (sf *LstSort) Size() int {
 }
 
 // Get -- возвращает по индексу.
-func (sf *LstSort) Get(ind int) ICtxValue {
+func (sf *LstSort) Get(ind int) mKt.ICtxValue {
 	sf.RLock()
 	defer sf.RUnlock()
-	Hassert(ind >= 0, "LstSort.Get(): ind(%v)<0", ind)
-	Hassert(ind < len(sf.lstVal), "LstSort.Get(): ind(%v)>=len(%v)", ind, len(sf.lstVal))
+	mL0.Hassert(ind >= 0, "LstSort.Get(): ind(%v)<0", ind)
+	mL0.Hassert(ind < len(sf.lstVal), "LstSort.Get(): ind(%v)>=len(%v)", ind, len(sf.lstVal))
 	return sf.lstVal[ind]
 }
 
 // удаляет элемент из списка.
-func (sf *LstSort) del(val ICtxValue) {
+func (sf *LstSort) del(val mKt.ICtxValue) {
 	var (
 		ind  int
-		_val ICtxValue
+		_val mKt.ICtxValue
 	)
 	for ind, _val = range sf.lstVal {
 		if val == _val {
@@ -81,7 +81,7 @@ func (sf *LstSort) del(val ICtxValue) {
 		return
 	}
 	lst0 := sf.lstVal[:ind]
-	lst1 := []ICtxValue{}
+	lst1 := []mKt.ICtxValue{}
 	if ind < len(sf.lstVal)-1 {
 		lst1 = sf.lstVal[ind+1:]
 	}
@@ -92,8 +92,8 @@ func (sf *LstSort) del(val ICtxValue) {
 }
 
 // возвращает сортированный список.
-func (sf *LstSort) list() []ICtxValue {
-	lst := make([]ICtxValue, 0, len(sf.lstVal))
+func (sf *LstSort) list() []mKt.ICtxValue {
+	lst := make([]mKt.ICtxValue, 0, len(sf.lstVal))
 	lst = append(lst, sf.lstVal...)
 	return lst
 }

+ 13 - 13
v4/lev1/mock_env/mock_env.go

@@ -5,7 +5,7 @@ import (
 	"os"
 	"strings"
 
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
+	mL0 "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
 )
 
 type IMockEnv interface {
@@ -30,7 +30,7 @@ func MakeEnv() *MockEnv {
 	sf.readEnv()
 	sf.parseEnv()
 	err := sf.SetAll()
-	Hassert(err == nil, "MakeEnv(): SetAll, err=\n\t%v", err)
+	mL0.Hassert(err == nil, "MakeEnv(): SetAll, err=\n\t%v", err)
 	return sf
 }
 
@@ -52,9 +52,9 @@ func (sf *MockEnv) parseEnv() {
 // Парсит строку окружения.
 func (sf *MockEnv) parseEnvStr(pair string) {
 	lstPair := strings.Split(pair, "=")
-	Hassert(len(lstPair) >= 2, "MockEnv.parseEnvStr(): pair(%v) not have =", pair)
+	mL0.Hassert(len(lstPair) >= 2, "MockEnv.parseEnvStr(): pair(%v) not have =", pair)
 	key := lstPair[0]
-	Hassert(key != "", "MockEnv.parseEnvStr(): in pair(%v) key is empty", pair)
+	mL0.Hassert(key != "", "MockEnv.parseEnvStr(): in pair(%v) key is empty", pair)
 	lstVal := lstPair[1:]
 
 	val := ""
@@ -63,21 +63,21 @@ func (sf *MockEnv) parseEnvStr(pair string) {
 	}
 	val = strings.TrimSuffix(val, "=")
 
-	Hassert(val != "", "MockEnv.parseEnvStr(): in pair(%v) val is empty", pair)
+	mL0.Hassert(val != "", "MockEnv.parseEnvStr(): in pair(%v) val is empty", pair)
 	sf.dictEnv[key] = val
 }
 
 // Читает файл переменных окружения.
 func (sf *MockEnv) readEnv() {
 	binEnv, err := os.ReadFile(sf.fileName)
-	Hassert(err == nil, "MockEnv.readEnv(): in read %v, err=\n\t%v", sf.fileName, err)
+	mL0.Hassert(err == nil, "MockEnv.readEnv(): in read %v, err=\n\t%v", sf.fileName, err)
 	sf.strEnv = string(binEnv)
 }
 
 // Устанавливает текущий путь относительно проекта в dev.
 func (sf *MockEnv) setPath() {
 	dir, err := os.Getwd()
-	Hassert(err == nil, "MockEnv.setPath(): in get PWD, err=\n\t%v", err)
+	mL0.Hassert(err == nil, "MockEnv.setPath(): in get PWD, err=\n\t%v", err)
 	lstDir := strings.Split(dir, "/")
 	pwd := ""
 	fileName := ""
@@ -91,12 +91,12 @@ func (sf *MockEnv) setPath() {
 			break
 		}
 	}
-	Hassert(isFind, "MockEnv.setPath(): not find file .env")
+	mL0.Hassert(isFind, "MockEnv.setPath(): not find file .env")
 	sf.pwd = pwd + "/bin_dev"
 	err = os.MkdirAll(sf.pwd, 0750)
-	Hassert(err == nil, "MockEnv.setPath(): in create PWD, err=\n\t%v", err)
+	mL0.Hassert(err == nil, "MockEnv.setPath(): in create PWD, err=\n\t%v", err)
 	err = os.Chdir(sf.pwd)
-	Hassert(err == nil, "MockEnv.setPath(): in set cwd(%v), err=\n\t%v", sf.pwd, err)
+	mL0.Hassert(err == nil, "MockEnv.setPath(): in set cwd(%v), err=\n\t%v", sf.pwd, err)
 	sf.fileName = fileName
 }
 
@@ -111,7 +111,7 @@ func (sf *MockEnv) SetAll() error {
 	for key, val := range sf.dictEnv {
 		sf.Reset("key")
 		err := os.Setenv(key, val)
-		Hassert(err == nil, "MockEnv.SetAll(): in set env %v on key %v, err=\n\t%v", key, val, err)
+		mL0.Hassert(err == nil, "MockEnv.SetAll(): in set env %v on key %v, err=\n\t%v", key, val, err)
 	}
 	return nil
 }
@@ -125,7 +125,7 @@ func (sf *MockEnv) ResetAll() {
 
 // Reset -- сбрасывает конкретный ключ.
 func (sf *MockEnv) Reset(key string) {
-	Hassert(key != "", "MockEnv.Reset(): key is empty")
+	mL0.Hassert(key != "", "MockEnv.Reset(): key is empty")
 	err := os.Unsetenv(key)
-	Hassert(err == nil, "MockEnv.Reset(): in reset env %v, err=\n\t%v", key, err)
+	mL0.Hassert(err == nil, "MockEnv.Reset(): in reset env %v, err=\n\t%v", key, err)
 }

+ 3 - 3
v4/lev2/kbus/dict_sub_hook/dict_sub_hook.go

@@ -12,7 +12,7 @@ import (
 
 // dictSubHook -- словарь потребителей топика по подписке.
 type dictSubHook struct {
-	kCtx   mKt.IKernelCtx
+	kCtx  mKt.IKernelCtx
 	dict  map[*mKa.AHandlerName]bool // В качестве ключа -- URL веб-хука
 	block sync.RWMutex
 }
@@ -20,7 +20,7 @@ type dictSubHook struct {
 // NewDictSubHook -- возвращает новый словарь веб-хуков одного топика.
 func NewDictSubHook() mKt.IDictSubHook {
 	sf := &dictSubHook{
-		kCtx:  kctx.GetKernelCtx(),
+		kCtx: kctx.GetKernelCtx(),
 		dict: map[*mKa.AHandlerName]bool{},
 	}
 	return sf
@@ -43,7 +43,7 @@ func (sf *dictSubHook) Unsubscribe(handler mKt.IBusHandlerSubscribe) {
 func (sf *dictSubHook) Subscribe(handler mKt.IBusHandlerSubscribe) {
 	sf.block.Lock()
 	defer sf.block.Unlock()
-	mL0.Hassert(handler!=nil, "dictSubHook.Subscribe(): handler==nil")
+	mL0.Hassert(handler != nil, "dictSubHook.Subscribe(): handler==nil")
 	handlerName := handler.Name()
 	sf.dict[handlerName] = true
 	sf.kCtx.Set(handlerName.Get(), handler, "subscribe handler")

+ 3 - 3
v4/lev2/kbus/dict_topic_sub/dict_topic_sub.go

@@ -48,10 +48,10 @@ func (sf *dictTopicSub) Read(topic *mKa.ATopic, binMsg []byte) {
 }
 
 // Subscribe -- подписывает обработчик на топик.
-func (sf *dictTopicSub) Subscribe(handler mKt.IBusHandlerSubscribe){
+func (sf *dictTopicSub) Subscribe(handler mKt.IBusHandlerSubscribe) {
 	sf.Lock()
 	defer sf.Unlock()
-	mL0.Hassert(handler!=nil,"dictTopicSub.Subscribe(): handler==nil")
+	mL0.Hassert(handler != nil, "dictTopicSub.Subscribe(): handler==nil")
 	topic := handler.Topic()
 	dictSubHook := sf.dictTopicHook[topic]
 	if dictSubHook == nil {
@@ -65,7 +65,7 @@ func (sf *dictTopicSub) Subscribe(handler mKt.IBusHandlerSubscribe){
 func (sf *dictTopicSub) Unsubscribe(handler mKt.IBusHandlerSubscribe) {
 	sf.Lock()
 	defer sf.Unlock()
-	mL0.Hassert(handler!=nil, "dictTopicSub.Unsubscribe(): handler==nil")
+	mL0.Hassert(handler != nil, "dictTopicSub.Unsubscribe(): handler==nil")
 	topic := handler.Topic()
 	dictSubHook := sf.dictTopicHook[topic]
 	if dictSubHook == nil {

+ 2 - 3
v4/lev2/kbus_base/kbus_base.go

@@ -6,7 +6,6 @@ import (
 	"sync"
 
 	mL0 "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
-	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
 	mKa "gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
 	mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 	mL1 "gitp78su.ipnodns.ru/svi/kern/v4/lev1"
@@ -16,7 +15,7 @@ import (
 )
 
 var (
-	busBaseStreamName = alias.NewAStreamName("bus_base")
+	busBaseStreamName = mKa.NewAStreamName("bus_base")
 )
 
 // KBusBase -- базовая часть шины данных.
@@ -79,7 +78,7 @@ func (sf *KBusBase) Unsubscribe(handler mKt.IBusHandlerSubscribe) {
 }
 
 // Subscribe -- подписывает обработчик на топик.
-func (sf *KBusBase) Subscribe(handler mKt.IBusHandlerSubscribe) mKt.IResult[bool]{
+func (sf *KBusBase) Subscribe(handler mKt.IBusHandlerSubscribe) mKt.IResult[bool] {
 	sf.log.Debug("KBusBase.Subscribe(): handler='%v'", handler.Name())
 	mL0.Hassert(!sf.IsWork_.Get(), "KBusBase.Subscribe():  handler='%v', bus already closed", handler.Name())
 	sf.dictSub.Subscribe(handler)

+ 10 - 14
v4/lev2/kbus_base/kbus_base_test.go

@@ -4,7 +4,7 @@ import (
 	"testing"
 
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
+	mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev2/kctx"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev2/mock_hand_serve"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev2/mock_hand_sub_local"
@@ -12,7 +12,7 @@ import (
 
 type tester struct {
 	t        *testing.T
-	kBus      IKernelBus
+	kBus     mKt.IKernelBus
 	handSub  *mock_hand_sub_local.MockHandlerSub
 	handServ *mock_hand_serve.MockHandlerServe
 }
@@ -117,23 +117,19 @@ func (sf *tester) pubGood10() {
 
 func (sf *tester) subGood1() {
 	sf.t.Log("subGood1")
-	defer func() {
-		if _panic := recover(); _panic != nil {
-			sf.t.Fatalf("subGood1(): panic=%v", _panic)
-		}
-	}()
-	sf.kBus.Subscribe(sf.handSub)
+	res := sf.kBus.Subscribe(sf.handSub)
+	if res.IsErr() {
+		sf.t.Fatalf("subGood1(): err=%v", res.Err())
+	}
 }
 
 // Нет обработчик подписки.
 func (sf *tester) subBad1() {
 	sf.t.Log("subBad1")
-	defer func() {
-		if _panic := recover(); _panic == nil {
-			sf.t.Fatalf("subBad1(): panic==nil")
-		}
-	}()
-	sf.kBus.Subscribe(nil)
+	res := sf.kBus.Subscribe(nil)
+	if res.IsOk() {
+		sf.t.Fatalf("subBad1(): err==nil")
+	}
 }
 
 // Создание локальной шины.

+ 1 - 1
v4/lev2/kbus_http/client_bus_http/client_bus_http_test.go

@@ -404,7 +404,7 @@ func (sf *tester) newGood1() {
 // Пустой URL.
 func (sf *tester) newBad2() {
 	sf.t.Log("newBad2")
-	_= NewClientBusHttp("")
+	_ = NewClientBusHttp("")
 }
 
 // Нет ничего для HTTP-шины.

+ 1 - 1
v4/lev2/kbus_local/client_bus_local/client_bus_local_test.go

@@ -8,7 +8,7 @@ import (
 )
 
 type tester struct {
-	t  *testing.T
+	t       *testing.T
 	lClient IBusClient
 }
 

+ 1 - 1
v4/lev2/kbus_local/kbus_local.go

@@ -13,7 +13,7 @@ type kernelBusLocal struct {
 }
 
 var (
-	bus *kernelBusLocal
+	bus   *kernelBusLocal
 	block sync.Mutex
 )
 

+ 1 - 1
v4/lev2/kbus_local/kbus_local_test.go

@@ -11,7 +11,7 @@ import (
 
 type tester struct {
 	t        *testing.T
-	lBus      IKernelBus
+	lBus     IKernelBus
 	handSub  *mock_hand_sub_local.MockHandlerSub
 	handServ *mock_hand_serve.MockHandlerServe
 }

+ 3 - 3
v4/lev2/kernel_keeper/kernel_keeper.go

@@ -38,9 +38,9 @@ func GetKernelKeeper(ctx context.Context, fnCancel func(),
 		kernKeep.log.Debug("GetKernelKeeper()")
 		return kernKeep
 	}
-	mL0.Hassert(ctx!=nil,"NewKernelCtx(): ctx==nil")
-	mL0.Hassert(wg!=nil, "NewKernelCtx(): IKernelWg==nil")
-	mL0.Hassert(fnCancel!=nil, "NewKernelCtx(): fnCancel==nil")
+	mL0.Hassert(ctx != nil, "NewKernelCtx(): ctx==nil")
+	mL0.Hassert(wg != nil, "NewKernelCtx(): IKernelWg==nil")
+	mL0.Hassert(fnCancel != nil, "NewKernelCtx(): fnCancel==nil")
 	sf := &kernelKeeper{
 		ctx:      ctx,
 		fnCancel: fnCancel,

+ 3 - 5
v4/lev2/kmodule/kmodule.go

@@ -5,9 +5,7 @@ import (
 	"time"
 
 	mL0 "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
-	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
 	mKa "gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
-	mKh "gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
 	mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 	mL1 "gitp78su.ipnodns.ru/svi/kern/v4/lev1"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev2/kbus_local"
@@ -60,7 +58,7 @@ func (sf *kModule) Ctx() mKt.ILocalCtx {
 
 // Run -- запускает модуль в работу.
 func (sf *kModule) Run() {
-	mKh.Hassert(false, "kModule.Run(): module='%v', parent not realized this method", sf.name)
+	mL0.Hassert(false, "kModule.Run(): module='%v', parent not realized this method", sf.name)
 }
 
 // Name -- возвращает уникальное имя модуля.
@@ -70,7 +68,7 @@ func (sf *kModule) Name() *mKa.AModuleName {
 
 // IsWork -- возвращает признак состояния работы.
 func (sf *kModule) IsWork() bool {
-	mKh.Hassert(false, "kModule.IsWork(): module='%v', parent not realized this method", sf.name)
+	mL0.Hassert(false, "kModule.IsWork(): module='%v', parent not realized this method", sf.name)
 	return false
 }
 
@@ -82,7 +80,7 @@ func (sf *kModule) Live() string {
 // Сигнал жизни, каждые 5 сек публикует в шину метку.
 func (sf *kModule) sigLive() {
 	var (
-		topic  = alias.NewATopic(sf.name.Get() + "_live")
+		topic  = mKa.NewATopic(sf.name.Get() + "_live")
 		iPhase = 0
 		res    mL0.IResult[bool]
 	)

+ 3 - 3
v4/lev2/kmonolit/kmonolit.go

@@ -26,7 +26,7 @@ type kMonolit struct {
 }
 
 var (
-	mon *kMonolit
+	mon   *kMonolit
 	block sync.Mutex
 )
 
@@ -77,10 +77,10 @@ func (sf *kMonolit) Name() string {
 }
 
 // Add -- добавляет модуль в монолит.
-func (sf *kMonolit) Add(module mKt.IKernelModule)  {
+func (sf *kMonolit) Add(module mKt.IKernelModule) {
 	sf.kCtx.RLock()
 	defer sf.kCtx.RUnlock()
-	mL0.Hassert(module!=nil, "kMonolit.Add(): module==nil")
+	mL0.Hassert(module != nil, "kMonolit.Add(): module==nil")
 	_, isOk := sf.dict[module.Name()]
 	mL0.Hassert(!isOk, "kMonolit.Add(): module(%v) already exists", module.Name())
 	sf.dict[module.Name()] = module

+ 10 - 11
v4/lev2/kmonolit/kmonolit_test.go

@@ -4,10 +4,9 @@ import (
 	"os"
 	"testing"
 
-	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
-	. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
+	mL0 "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
+	mKa "gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
+	mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev1/mock_env"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev2/kctx"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev2/kmodule"
@@ -21,7 +20,7 @@ const (
 type tester struct {
 	t   *testing.T
 	me  *mock_env.MockEnv
-	mon IKernelMonolit
+	mon mKt.IKernelMonolit
 }
 
 func TestKernMono(t *testing.T) {
@@ -61,10 +60,10 @@ func (sf *tester) add() {
 }
 
 type mod struct {
-	IKernelModule
+	mKt.IKernelModule
 }
 
-func newMod(name *AModuleName) IKernelModule {
+func newMod(name *mKa.AModuleName) mKt.IKernelModule {
 	sf := &mod{
 		IKernelModule: kmodule.NewKernelModule(name),
 	}
@@ -75,14 +74,14 @@ func (sf *mod) Run() {}
 
 func (sf *tester) addGood1() {
 	sf.t.Log("addGood1")
-	modName := alias.NewAModuleName("test_module")
+	modName := mKa.NewAModuleName("test_module")
 	mod := newMod(modName)
 	sf.mon.Add(mod)
 }
 
 func (sf *tester) run() {
 	sf.t.Log("run")
-	modName := alias.NewAModuleName("test_mod1")
+	modName := mKa.NewAModuleName("test_mod1")
 	mod := newMod(modName)
 	sf.mon.Add(mod)
 	sf.mon.Run()
@@ -109,7 +108,7 @@ func (sf *tester) newGood1() {
 	kCtx := kctx.GetKernelCtx()
 	kCtx.Set("isLocal", true, "type bus")
 	for {
-		SleepMs()
+		mL0.SleepMs()
 		if kCtx.Get("isLocal") != nil {
 			break
 		}
@@ -134,5 +133,5 @@ func (sf *tester) newGood1() {
 // Нет признака локальности.
 func (sf *tester) newBad1() {
 	sf.t.Log("newBad1")
-	_= GetMonolit("test_32")
+	_ = GetMonolit("test_32")
 }

+ 7 - 7
v4/lev2/kserv_http/kserv_http_test.go

@@ -15,18 +15,18 @@ const (
 )
 
 type tester struct {
-	t   *testing.T
+	t    *testing.T
 	kCtx IKernelCtx
-	wg  IKernelWg
-	me  *mock_env.MockEnv
+	wg   IKernelWg
+	me   *mock_env.MockEnv
 }
 
 func TestKernelServHttp(t *testing.T) {
 	kCtx := kctx.GetKernelCtx()
 	sf := &tester{
-		t:   t,
+		t:    t,
 		kCtx: kCtx,
-		wg:  kCtx.Wg(),
+		wg:   kCtx.Wg(),
 	}
 	sf.new()
 	sf.close()
@@ -102,11 +102,11 @@ func (sf *tester) newGood1() {
 // Не указана SERVER_HTTP_PORT.
 func (sf *tester) newBad2() {
 	sf.t.Log("newBad2()")
-	_= GetKernelServHttp()
+	_ = GetKernelServHttp()
 }
 
 // Нет контекста ядра.
 func (sf *tester) newBad1() {
 	sf.t.Log("newBad1()")
-	_= GetKernelServHttp()
+	_ = GetKernelServHttp()
 }

+ 2 - 2
v4/lev2/kstore_kv/kstore_kv.go

@@ -34,8 +34,8 @@ type kStoreKv struct {
 }
 
 var (
-	kernStore       *kStoreKv // Глобальный объект
-	block           sync.Mutex
+	kernStore *kStoreKv // Глобальный объект
+	block     sync.Mutex
 )
 
 // GetKernelStore -- возвращает новое локальное хранилище ядра.

+ 4 - 8
v4/lev2/kstore_kv_std/kv_bucket_base/kv_bucket_base.go

@@ -2,16 +2,12 @@
 package kv_bucket_base
 
 import (
+	mL0 "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
-	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
 	"gitp78su.ipnodns.ru/svi/kern/v4/lev0/voc"
 )
 
-var (
-	hassert = helpers.Hassert
-)
-
 // KvBucketBase -- базовый бакет хранилища KV.
 //
 // Бакет знает все свои свойства:
@@ -37,9 +33,9 @@ type KvBucketBase struct {
 
 // NewKvBucketBase -- создание нового базового бакета хранилища KV.
 func NewKvBucketBase(name string, level int, number int) *KvBucketBase {
-	hassert(name != "", "NewKvBucketBase: name is empty")
-	hassert(level >= 0, "NewKvBucketBase: level is negative")
-	hassert(number >= 0, "NewKvBucketBase: number is negative")
+	mL0.Hassert(name != "", "NewKvBucketBase: name is empty")
+	mL0.Hassert(level >= 0, "NewKvBucketBase: level is negative")
+	mL0.Hassert(number >= 0, "NewKvBucketBase: number is negative")
 	sf := &KvBucketBase{
 		Name_:      name,
 		Level_:     level,

+ 1 - 1
v4/lev2/wui/wui_button/wui_button.go

@@ -25,7 +25,7 @@ type FnBtnBack func(map[string]string) mL0.IResult[string]
 
 // NewWuiButton -- возвращает новую WUI-кнопку.
 func NewWuiButton(text string, fnBack FnBtnBack) *WuiButton {
-	mL0.Hassert(fnBack!=nil, "NewWuiButton(): text=%q, fnBack==nil", text)
+	mL0.Hassert(fnBack != nil, "NewWuiButton(): text=%q, fnBack==nil", text)
 	sf := &WuiButton{
 		IWuiWidget: wui_widget.NewWuiWidget(),
 		text:       wui_text.NewWuiText(text),

+ 5 - 5
v4/lev3/mod_kctx/mod_kctx_test.go

@@ -16,16 +16,16 @@ const (
 )
 
 type tester struct {
-	t   *testing.T
-	me  *mock_env.MockEnv
+	t    *testing.T
+	me   *mock_env.MockEnv
 	kCtx IKernelCtx
-	mod IKernelModule
+	mod  IKernelModule
 }
 
 func TestModKernelCtx(t *testing.T) {
 	sf := &tester{
-		t:   t,
-		me:  mock_env.MakeEnv(),
+		t:    t,
+		me:   mock_env.MakeEnv(),
 		kCtx: kctx.GetKernelCtx(),
 	}
 	_ = os.Unsetenv("LOCAL_STORE_PATH")

+ 5 - 5
v4/lev3/mod_keeper/mod_keeper_test.go

@@ -16,16 +16,16 @@ const (
 )
 
 type tester struct {
-	t   *testing.T
-	me  *mock_env.MockEnv
+	t    *testing.T
+	me   *mock_env.MockEnv
 	kCtx IKernelCtx
-	mod IKernelModule
+	mod  IKernelModule
 }
 
 func TestModKeeper(t *testing.T) {
 	sf := &tester{
-		t:   t,
-		me:  mock_env.MakeEnv(),
+		t:    t,
+		me:   mock_env.MakeEnv(),
 		kCtx: kctx.GetKernelCtx(),
 	}
 	_ = os.Unsetenv("LOCAL_STORE_PATH")

+ 1 - 1
v4/lev3/mod_serv_http/btn_modules/btn_modules.go

@@ -58,7 +58,7 @@ func (sf *BtnModules) clickMonolit(dict map[string]string) mL0.IResult[string] {
 		strRow := strBlockRow
 		strRow = strings.ReplaceAll(strRow, "{.id}", id)
 		strRow = strings.ReplaceAll(strRow, "{.key}", val.Key())
-		moduleName := string(val.Val().(mKt.IKernelModule).Name().Get())
+		moduleName := val.Val().(mKt.IKernelModule).Name().Get()
 		strRow = strings.ReplaceAll(strRow, "{.name}", moduleName)
 		type_ := fmt.Sprintf("%#T", val.Val())
 		type_ = strings.ReplaceAll(type_, ".", ".<br>")

+ 2 - 2
v4/lev3/mod_serv_http/http_api/http_api_test.go

@@ -14,14 +14,14 @@ import (
 
 type tester struct {
 	t    *testing.T
-	kCtx  IKernelCtx
+	kCtx IKernelCtx
 	serv IKernelServerHttp
 	api  *HttpApi
 }
 
 func TestPageMonolit(t *testing.T) {
 	sf := &tester{
-		t:   t,
+		t:    t,
 		kCtx: kctx.GetKernelCtx(),
 	}
 	sf.new()

+ 3 - 3
v4/lev3/mod_serv_http/page_monolit/page_monolit.go

@@ -17,13 +17,13 @@ import (
 
 // PageMonolit -- страница показа монолита.
 type PageMonolit struct {
-	kCtx        mKt.IKernelCtx
+	kCtx       mKt.IKernelCtx
 	btnMonolit *btn_monolit.BtnMonolit
 	btnModules *btn_modules.BtnModules
 }
 
 var (
-	page *PageMonolit
+	page  *PageMonolit
 	block sync.Mutex
 )
 
@@ -35,7 +35,7 @@ func GetPageMonolit() *PageMonolit {
 		return page
 	}
 	sf := &PageMonolit{
-		kCtx:        kctx.GetKernelCtx(),
+		kCtx:       kctx.GetKernelCtx(),
 		btnMonolit: btn_monolit.NewBtnMonolit(),
 		btnModules: btn_modules.NewBtnModules(),
 	}

+ 3 - 3
v4/lev3/mod_wui/mod_wui_test.go

@@ -27,15 +27,15 @@ const (
 type tester struct {
 	t        *testing.T
 	me       *mock_env.MockEnv
-	kCtx      IKernelCtx
+	kCtx     IKernelCtx
 	fiberApp *fiber.App
 	mod      *ModuleWui
 }
 
 func TestModKernelCtx(t *testing.T) {
 	sf := &tester{
-		t:   t,
-		me:  mock_env.MakeEnv(),
+		t:    t,
+		me:   mock_env.MakeEnv(),
 		kCtx: kctx.GetKernelCtx(),
 	}
 	_ = os.Unsetenv("LOCAL_STORE_PATH")