Skip to content

Commit 5617255

Browse files
committed
nit
1 parent 67b3e46 commit 5617255

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dbos/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ func LoadConfig() (*configFile, error) {
3232
return &config, nil
3333
}
3434

35-
// ProcessConfig merges configuration from three sources in order of precedence:
35+
// NewConfig merges configuration from three sources in order of precedence:
3636
// 1. programmatic configuration (highest precedence)
3737
// 2. configuration file
3838
// 3. environment variables (lowest precedence)
39-
func ProcessConfig(programmaticConfig config) *config {
39+
func NewConfig(programmaticConfig config) *config {
4040
fileConfig, err := LoadConfig()
4141
if err != nil && !os.IsNotExist(err) {
4242
panic(err)

dbos/dbos.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,14 @@ func Launch(options ...LaunchOption) error {
122122
return NewInitializationError("DBOS already initialized")
123123
}
124124

125+
// Load & process the configuration
125126
config := &config{
126127
logger: slog.New(slog.NewTextHandler(os.Stderr, nil)),
127128
}
128129
for _, option := range options {
129130
option(config)
130131
}
132+
config = NewConfig(*config)
131133

132134
logger = config.logger
133135

@@ -146,8 +148,6 @@ func Launch(options ...LaunchOption) error {
146148

147149
APP_ID = os.Getenv("DBOS__APPID")
148150

149-
config = ProcessConfig(*config)
150-
151151
// Create the system database
152152
systemDB, err := NewSystemDatabase(config.databaseURL)
153153
if err != nil {

0 commit comments

Comments
 (0)