gcfg icon indicating copy to clipboard operation
gcfg copied to clipboard

support optional section + key/value map as section

Open mandelsoft opened this issue 5 years ago • 0 comments

This pull request provides support for the following missing features:

  • Dynamic Section Content using the type map[string]string it is possible to catch dynamic section content (key/value) pairs. So far only string values are possible. The Tags example has been adapted to show real tags.
  • Dynamic Sub Section Content using the type map[string]map[string]string it is possible to catch dynamic sub section content, also.
  • Use of Structs as well as Struct Pointers for plain sections as well as sub sections it is possible now to use pointers to structs or structs.
  • Optional Sections for plain sections, the use of a pointer type now allows to identify optional sections. The field is nil if the section is not given in the config data. It points to an initial struct, if the section is given, but no fields.

There are appropriate examples and tests added.

mandelsoft avatar Nov 18 '19 13:11 mandelsoft