Compare commits
2 Commits
86bf9b10af
...
e4cf7d6960
Author | SHA1 | Date | |
---|---|---|---|
|
e4cf7d6960 | ||
|
24c899a22b |
15
.vscode/launch.json
vendored
Normal file
15
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Package",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${fileDirname}"
|
||||
}
|
||||
]
|
||||
}
|
@ -137,7 +137,7 @@ func GetConns() (storage.Conns, error) {
|
||||
// LoadConfig initializes the configuration values after environment variables are loaded.
|
||||
func LoadConfig() error {
|
||||
configManager = NewConfig(logg)
|
||||
|
||||
|
||||
// Add configuration keys with validation
|
||||
configManager.AddKey("HOST", "127.0.0.1", false, nil)
|
||||
configManager.AddKey("PORT", "7123", false, func(v string) error {
|
||||
@ -145,7 +145,7 @@ func LoadConfig() error {
|
||||
return err
|
||||
})
|
||||
configManager.AddKey("DB_CONN", "", true, nil)
|
||||
// ... add other keys ...
|
||||
// ... add other keys ? or is enough :/ ...
|
||||
|
||||
err := setConn()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user