-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
433 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FOO=foo value | ||
BAR=bar value | ||
EXAMPLE=${FOO}-${BAR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/go-andiamo/cfgenv" | ||
) | ||
|
||
type Config struct { | ||
Example string | ||
} | ||
|
||
func main() { | ||
cfg := &Config{} | ||
err := cfgenv.Load(cfg, cfgenv.Expand()) | ||
if err != nil { | ||
panic(err) | ||
} else { | ||
fmt.Printf("%+v\n", cfg) | ||
} | ||
} |
Oops, something went wrong.