aboutsummaryrefslogtreecommitdiffstats
path: root/_examples
diff options
context:
space:
mode:
authorWes Morgan <wesmorgan@icloud.com>2020-04-07 07:59:36 -0600
committerWes Morgan <wesmorgan@icloud.com>2020-04-07 07:59:36 -0600
commit68bffab4d6fa84260cc4287f979a6feceaf92ff8 (patch)
treefe47883e502effc1eafdb5447986f585d3c476be /_examples
parent4d4e2b1fe291d8ab5cc844a03f2a03e073a87a8c (diff)
downloadgo-git-68bffab4d6fa84260cc4287f979a6feceaf92ff8.tar.gz
Simplify a couple of config examples
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"))