Skip to content

dev/sg: remove globalConf, extract Config into sgconf

Warren Gifford requested to merge sgconf-package into main

Created by: bobheadxi

Instead of hoping globalConf is initialized somewhere, callers now explicitly use sgconf.Get to retrieve the global instance of sg config and any relevant warning.

The new sgconf.Get can only be called after the app is initialized - e.g. within an Action or in a Before, After, or postInitHook hook, otherwise it panics. This will get caught by TestAppRun if it ever happens (the test caught one instance of it occurring)

Test plan

go build -o ./sg ./dev/sg
./sg ...

Merge request reports

Loading