Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shima-park authored Jul 20, 2020
1 parent 3306c34 commit af2fc41
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ func main() {
}
fmt.Println(
// 配置项foo的value
// 默认读取Namespace:application下key: foo的value
a.Get("foo"),
// namespace为test.json的所有配置项
// 获取namespace为test.json的所有配置项
a.GetNameSpace("test.json"),
// 默认值, 为xxx提供一个默认bar
a.Get("xxx", agollo.WithDefault("bar")),
// 当key:foo不存在时,提供一个默认值bar
a.Get("foo", agollo.WithDefault("bar")),
// namespace为other_namespace, key为foo的value
// 读取Namespace为other_namespace, key: foo的value
a.Get("foo", agollo.WithNamespace("other_namespace")),
)
}
Expand Down

0 comments on commit af2fc41

Please sign in to comment.