Skip to content

Commit

Permalink
revise doc (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktong authored Nov 13, 2023
1 parent 38d5dd5 commit 1147575
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Somewhere, early in an application's life, it will make a decision about which
configuration source(s) (implementation) it actually wants to use. Something like:

```
//go:embed testdata
//go:embed config
var config embed.FS
func main() {
// Create the global Config that loads configuration
// from embed file system and environment variables.
cfg, err := konf.New(
konf.WithLoader(
file.New("config/config.json", file.WithFS(config)),
fs.New(config, "config/config.json"),
env.New(env.WithPrefix("server")),
),
)
Expand Down Expand Up @@ -76,8 +76,8 @@ configuration source(s). They read configuration in terms of functions in packag
// Register callbacks while server configuration changes.
konf.OnChange(func() {
// Reconfig the application object.
}, "server")
// Reconfig the application object.
}, "server")
// ... use cfg in app code ...
}
Expand Down

0 comments on commit 1147575

Please sign in to comment.