You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh yo
8000
ur session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When saving with ini.saveTo() the target file is created or replaced succesfully. However, it contains proper section names and keys, but all the values are missing.
I have verified the values contain data by performing fmt.Printf output right before calling ini.saveTo()
Activity
vadeva commentedon Apr 27, 2016
I have found the reason, sorry.
The ini.Key([key_name]).Must*([default_value]) methods do NOT set the value of the key to the default one passed.
Such behaviour is very inobvious...
One ends up with an always existing key, but it may have no value!
Probably, it may be a good idea to provide a method like
func (s *Section) GuaranteeKey(key, defaultValue string) *Key
unknwon commentedon Jun 29, 2016
Good point!
[-]Values not saved with «ini.SaveTo(iniFilePath string)»[/-][+]Values not saved with Must... methods[/+]#45 Must... methods assign default value when void
unknwon commentedon Jun 29, 2016
Changes pushed.