Improved build tests
All checks were successful
/ test (push) Successful in 17s

This commit is contained in:
Eduard Urbach 2025-06-20 13:16:44 +02:00
parent c35f8ff05c
commit aae75197e9
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
6 changed files with 87 additions and 90 deletions

View file

@ -3,6 +3,7 @@ package global
import (
"os"
"path/filepath"
"runtime"
"runtime/debug"
)
@ -12,12 +13,16 @@ var (
Library string
Root string
WorkingDirectory string
HostOS string
HostArch string
)
// init is the very first thing that's executed.
// It disables the GC and initializes global variables.
func init() {
debug.SetGCPercent(-1)
HostOS = runtime.GOOS
HostArch = runtime.GOARCH
var err error
Executable, err = os.Executable()