From e8134bd5cbd58c7df5fdbe18f98e9c22675f6505 Mon Sep 17 00:00:00 2001 From: "Leonid Titov, CS" <5195118@gmail.com> Date: Fri, 28 May 2021 12:55:17 +0300 Subject: [PATCH 1/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7f55425..ffa117d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ Package config provides convenient access methods to configuration stored as JSON or YAML. +This is a fork from olebedev/config. That's fascinating piece of work, and we used it extensively. However, we stumbled upon a need for blazing-fast improvemenets, that was the reson to fork it. We hope to merge it back someday. + This is a fork of the [original version](https://github.com/moraes/config). This version extends the functionality of the original without losing compatibility. Major features added: From 6cb3535e01f8f9f050cf9d3a2f250f9a534a7148 Mon Sep 17 00:00:00 2001 From: "Leonid Titov, CS" <5195118@gmail.com> Date: Fri, 28 May 2021 13:00:09 +0300 Subject: [PATCH 2/4] Update config.go --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index 1a7532b..e25a3a9 100644 --- a/config.go +++ b/config.go @@ -509,7 +509,7 @@ func Set(cfg interface{}, path string, value interface{}) error { c[part] = value } else { // if exists just pick the pointer - if va, ok := c[part]; ok { + if va, ok := c[part]; ok && va != nil { point = &va } else { // is next part slice or map? From 4e62ef328576a3c026a9d9d911c4a60de162d01a Mon Sep 17 00:00:00 2001 From: "Leonid Titov, CS" <5195118@gmail.com> Date: Fri, 28 May 2021 13:06:55 +0300 Subject: [PATCH 3/4] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index ffa117d..7f55425 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,6 @@ Package config provides convenient access methods to configuration stored as JSON or YAML. -This is a fork from olebedev/config. That's fascinating piece of work, and we used it extensively. However, we stumbled upon a need for blazing-fast improvemenets, that was the reson to fork it. We hope to merge it back someday. - This is a fork of the [original version](https://github.com/moraes/config). This version extends the functionality of the original without losing compatibility. Major features added: From bae8137b389a0d59d973724dd3ffccb0b9d88148 Mon Sep 17 00:00:00 2001 From: "Leonid Titov, CS" <5195118@gmail.com> Date: Thu, 9 Dec 2021 12:15:04 +0300 Subject: [PATCH 4/4] Update README.md --- README.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7f55425..275139d 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,8 @@ -# Config [![wercker status](https://app.wercker.com/status/b4e8561d9a711afcb016bf0018e83897/s/ "wercker status")](https://app.wercker.com/project/bykey/b4e8561d9a711afcb016bf0018e83897) [![GoDoc](https://godoc.org/github.com/olebedev/config?status.png)](https://godoc.org/github.com/olebedev/config) +# Config [![GoDoc](https://godoc.org/github.com/rusriver/config?status.png)](https://godoc.org/github.com/rusriver/config) Package config provides convenient access methods to configuration stored as JSON or YAML. -This is a fork of the [original version](https://github.com/moraes/config). -This version extends the functionality of the original without losing compatibility. -Major features added: +This is a fork of the A fork of [olebedev/config](https://github.com/olebedev/config), +which in turn is a fork of [original version](https://github.com/moraes/config). -- [`Set(path string, value interface{}) error`](http://godoc.org/github.com/olebedev/config#Config.Set) method -- [`Env() *config.Config`](http://godoc.org/github.com/olebedev/config#Config.Env) method, for OS environment variables parsing -- [`Flag() *config.Config`](http://godoc.org/github.com/olebedev/config#Config.Flag) method, for command line arguments parsing usign pkg/flag singleton -- [`Args(args ...string) *config.Config`](http://godoc.org/github.com/olebedev/config#Config.Args) method, for command line arguments parsing -- [`U*`](https://godoc.org/github.com/olebedev/config#Config.UBool) methods -- [`Copy(...path) (*config.config, error)`](https://godoc.org/github.com/olebedev/config#Config.Copy) method -- [`Extend(*config.Config) (*config.Config, error)`](https://godoc.org/github.com/olebedev/config#Config.Extend) method -- [`Error() error`](https://godoc.org/github.com/olebedev/config#Config.Error) method to show last parsing error, works only with `.Args()` method - -Example and more information you can find [here](http://godoc.org/github.com/olebedev/config).