Skip to content

Commit

Permalink
chore: run tab2space
Browse files Browse the repository at this point in the history
  • Loading branch information
tmzane committed May 2, 2024
1 parent 362b2e9 commit 9f684ec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ os.Setenv("DB_HOST", "localhost")
os.Setenv("DB_PORT", "5432")

var cfg struct {
DB struct {
Host string `env:"HOST"`
Port int `env:"PORT"`
} `env:"DB"`
DB struct {
Host string `env:"HOST"`
Port int `env:"PORT"`
} `env:"DB"`
}
if err := env.Load(&cfg, &env.Options{NameSep: "_"}); err != nil {
fmt.Println(err)
fmt.Println(err)
}

fmt.Println(cfg.DB.Host) // localhost
Expand Down

0 comments on commit 9f684ec

Please sign in to comment.