2025-01-12 10:59:36 +01:00
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
2025-01-12 11:33:15 +01:00
|
|
|
viseconfig "git.grassecon.net/grassrootseconomics/visedriver/config"
|
2025-01-12 10:59:36 +01:00
|
|
|
apiconfig "git.grassecon.net/grassrootseconomics/sarafu-api/config"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2025-01-12 11:33:15 +01:00
|
|
|
DbConn = viseconfig.DbConn
|
|
|
|
DefaultLanguage = viseconfig.DefaultLanguage
|
2025-01-12 10:59:36 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func LoadConfig() error {
|
2025-01-12 11:33:15 +01:00
|
|
|
err := viseconfig.LoadConfig()
|
2025-01-12 10:59:36 +01:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2025-01-12 11:33:15 +01:00
|
|
|
err = apiconfig.LoadConfig()
|
2025-01-12 10:59:36 +01:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2025-01-12 11:33:15 +01:00
|
|
|
DbConn = viseconfig.DbConn
|
|
|
|
DefaultLanguage = viseconfig.DefaultLanguage
|
2025-01-12 10:59:36 +01:00
|
|
|
return nil
|
|
|
|
}
|