Simplify Loadconfig, remove unneeded error return var.
This commit is contained in:
+2
-2
@@ -14,7 +14,7 @@ type Config struct {
|
||||
DBURL string
|
||||
}
|
||||
|
||||
func LoadConfig() (*Config, error) {
|
||||
func LoadConfig() *Config {
|
||||
Config := new(Config)
|
||||
|
||||
err := godotenv.Load(".env")
|
||||
@@ -46,5 +46,5 @@ func LoadConfig() (*Config, error) {
|
||||
panic("DATABASE_URL environment variable not set")
|
||||
}
|
||||
|
||||
return Config, nil
|
||||
return Config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user