changing to initiator

This commit is contained in:
Ramiro Paz
2026-03-10 16:28:09 -03:00
parent 557c04436d
commit 5053bfa9af
8 changed files with 58 additions and 86 deletions

View File

@ -3,7 +3,6 @@ package version
import (
"fmt"
"os"
"runtime"
"strings"
)
@ -38,17 +37,17 @@ type EnvironmentType int //nolint:recvcheck // The methods of this are autogener
var environment EnvironmentType //nolint:gochecknoglobals // Just keept this global to avoid having to create an instance
func init() {
aux := os.Getenv(quantexEnvironment)
if aux == "" {
panic("QUANTEX_ENVIRONMENT is not set")
}
// aux := os.Getenv(EnvironmentTypeDev)
// if aux == "" {
// panic("QUANTEX_ENVIRONMENT is not set")
// }
env, err := ParseEnvironmentType(aux)
if err != nil {
panic("Invalid QUANTEX_ENVIRONMENT value: " + aux + " " + err.Error())
}
// env, err := ParseEnvironmentType(aux)
// if err != nil {
// panic("Invalid QUANTEX_ENVIRONMENT value: " + aux + " " + err.Error())
// }
environment = env
environment = EnvironmentTypeDev
}
// Base returns the version base name