mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 14:30:29 +00:00
wip: refactoring tui
This commit is contained in:
parent
5e738ce7d3
commit
15d21bf04a
10 changed files with 135 additions and 271 deletions
|
|
@ -125,7 +125,7 @@ var cfg *Config
|
|||
// Load initializes the configuration from environment variables and config files.
|
||||
// If debug is true, debug mode is enabled and log level is set to debug.
|
||||
// It returns an error if configuration loading fails.
|
||||
func Load(workingDir string, debug bool, lvl *slog.LevelVar) (*Config, error) {
|
||||
func Load(workingDir string, debug bool) (*Config, error) {
|
||||
if cfg != nil {
|
||||
return cfg, nil
|
||||
}
|
||||
|
|
@ -161,7 +161,6 @@ func Load(workingDir string, debug bool, lvl *slog.LevelVar) (*Config, error) {
|
|||
if cfg.Debug {
|
||||
defaultLevel = slog.LevelDebug
|
||||
}
|
||||
lvl.Set(defaultLevel)
|
||||
slog.SetLogLoggerLevel(defaultLevel)
|
||||
|
||||
// Validate configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue