Skip to content

Commit

Permalink
Add note on Environment translation
Browse files Browse the repository at this point in the history
Fix #4
  • Loading branch information
paked committed Apr 8, 2016
1 parent 189d26b commit 9da2328
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func init() {
```
The configuration stage is where you configure `configure` by adding Checkers to the stack. Checkers are objects which will attempt to retrieve your variables from their respective data sources. When a `Checker` fails the next one in the stack is called, the stack is in the same order that the `Checker`'s were added in. You can configure `configure` anytime before you call the `conf.Parse()` function, but the `init()` function provides a reliable place to do so.

*note:* When using the `Environment `Checker`, all keys will be translated to uppercase and have dashes replaced with underscores (ie. `hello-world` to `HELLO_WORLD`).

### Stage Three : Usage
```go
func main() {
Expand Down
1 change: 1 addition & 0 deletions environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

// NewEnvironment creates a new instance of the Environment Checker.
// Note: If you request a value "peanut-butter", the environment variable that will be checked is `PEANUT_BUTTER`.
func NewEnvironment() *Environment {
return &Environment{}
}
Expand Down

0 comments on commit 9da2328

Please sign in to comment.