Skip to content

Commit

Permalink
doc(main): Updated documentation (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekkinox authored Jul 26, 2024
1 parent bee6938 commit 446bb92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
19 changes: 11 additions & 8 deletions docs/modules/fxconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ For the following examples, we will be considering those configuration files:
```yaml title="configs/config.yaml"
app:
name: app
description: app description
env: dev
version: 0.1.0
debug: false
Expand Down Expand Up @@ -93,10 +94,11 @@ func NewExampleService(config *config.Config) *ExampleService {
func (s *ExampleService) PrintConfig() {
// helpers
fmt.Printf("name: %s", s.config.AppName()) // name: app
fmt.Printf("env: %s", s.config.AppEnv()) // env: dev
fmt.Printf("version: %s", s.config.AppVersion()) // version: 0.1.0
fmt.Printf("debug: %v", s.config.AppDebug()) // debug: false
fmt.Printf("name: %s", s.config.AppName()) // name: app
fmt.Printf("description: %s", s.config.AppDescription()) // description: app description
fmt.Printf("env: %s", s.config.AppEnv()) // env: dev
fmt.Printf("version: %s", s.config.AppVersion()) // version: 0.1.0
fmt.Printf("debug: %v", s.config.AppDebug()) // debug: false
// others
fmt.Printf("string_value: %s", s.config.GetString("config.values.string_value")) // string_value: default
Expand All @@ -118,10 +120,11 @@ If you run your application in `test` mode:
// helpers
fmt.Printf("var: %s", s.config.GetEnvVar("APP_ENV")) // var: test
fmt.Printf("name: %s", s.config.AppName()) // name: app
fmt.Printf("env: %s", s.config.AppEnv()) // env: test
fmt.Printf("version: %s", s.config.AppVersion()) // version: 0.1.0
fmt.Printf("debug: %v", s.config.AppDebug()) // debug: true
fmt.Printf("name: %s", s.config.AppName()) // name: app
fmt.Printf("description: %s", s.config.AppDescription()) // description: app description
fmt.Printf("env: %s", s.config.AppEnv()) // env: test
fmt.Printf("version: %s", s.config.AppVersion()) // version: 0.1.0
fmt.Printf("debug: %v", s.config.AppDebug()) // debug: true
// others
fmt.Printf("string_value: %s", s.config.GetString("config.values.string_value")) // string_value: test
Expand Down
1 change: 1 addition & 0 deletions docs/modules/fxcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ modules:
dashboard:
enabled: true # to enable the core dashboard
overview:
app_description: true # to display the app description on the dashboard overview
app_env: true # to display the app env on the dashboard overview
app_debug: true # to display the app debug on the dashboard overview
app_version: true # to display the app version on the dashboard overview
Expand Down

0 comments on commit 446bb92

Please sign in to comment.