aboutsummaryrefslogtreecommitdiffstats
path: root/_examples
diff options
context:
space:
mode:
Diffstat (limited to '_examples')
-rw-r--r--_examples/config/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/_examples/config/main.go b/_examples/config/main.go
index 5fb8fba..6ccc9f6 100644
--- a/_examples/config/main.go
+++ b/_examples/config/main.go
@@ -50,10 +50,10 @@ func main() {
// suffice for what you're trying to do.
// Set local custom config param
- cfg.Merged.LocalConfig().AddOption("custom", format.NoSubsection, "name", "Local Name")
+ cfg.Merged.AddOption(format.LocalScope, "custom", format.NoSubsection, "name", "Local Name")
// Set global config param (~/.gitconfig)
- cfg.Merged.GlobalConfig().AddOption("custom", format.NoSubsection, "name", "Global Name")
+ cfg.Merged.AddOption(format.GlobalScope, "custom", format.NoSubsection, "name", "Global Name")
// Get custom config param (merged in the same way git does: system -> global -> local)
Info("custom.name is %s", cfg.Merged.Section("custom").Option("name"))