From de7b7611ae6f331eb0f4a110f43c3e32c956f296 Mon Sep 17 00:00:00 2001 From: metalwolf Date: Mon, 10 Feb 2020 09:58:13 -0600 Subject: [PATCH] patch v0.2.1 --- README.md | 5 +++++ xconfig.go | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1294fa1..d6166a4 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,11 @@ TO DO: Version Changes Control ======================= +v0.2.1 - 2020-02-10 +----------------------- +- Documentation enhanced +- Bug corrected on String and GoString() + v0.2.0 - 2020-02-10 ----------------------- - Modification to XConfig to meet xcore v1.0.0 (.String and .GoString functions added, .Stringify function removed) diff --git a/xconfig.go b/xconfig.go index e236bdf..0fe0451 100644 --- a/xconfig.go +++ b/xconfig.go @@ -41,7 +41,7 @@ import ( ) // VERSION is the used version nombre of the XCore library. -const VERSION = "0.2.0" +const VERSION = "0.2.1" // Parameter is the basic entry parameter into the configuration object // Value is the value of the parameter. @@ -387,11 +387,16 @@ func (c *XConfig) parsestring(data string, merge bool) error { */ func (c *XConfig) String() string { - return c.GoString() + str := "XConfig[\n" + for key, val := range (*c).Parameters { + str += " " + key + ":" + fmt.Sprint(val.Value) + "\n" + } + str += "]\n" + return str } func (c *XConfig) GoString() string { - return fmt.Sprint(c) + return c.String() } func (c *XConfig) Set(key string, value interface{}) {