Skip to content

Commit

Permalink
fix: .env not exist fallback (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekomeowww authored May 8, 2023
1 parent 5eadd47 commit 9acef0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/configs/configs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package configs

import (
"errors"
"os"

"github.com/joho/godotenv"
Expand Down Expand Up @@ -64,7 +65,7 @@ type Config struct {
func NewConfig() func() (*Config, error) {
return func() (*Config, error) {
envs, err := godotenv.Read()
if err != nil {
if err != nil && !errors.Is(err, os.ErrNotExist) {
return nil, err
}

Expand Down

0 comments on commit 9acef0b

Please sign in to comment.