Skip to content

Commit

Permalink
Merge pull request #13 from webability-go/late-night
Browse files Browse the repository at this point in the history
patch v0.2.1
  • Loading branch information
metalwolf authored Feb 10, 2020
2 parents cbb2acc + de7b761 commit d32631a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 8 additions & 3 deletions xconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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{}) {
Expand Down

0 comments on commit d32631a

Please sign in to comment.