ini.go
func (c *Config) Set(sectionName, key, value string) {
	for i, sect := range c.sections {
		if sect.name == sectionName {
			for j, opt := range sect.options {
				if opt.name == key {
					c.sections[i].options[j].value = value
					return
				}
			}
			c.sections[i].options = append(sect.options, option{key, value})
			return
		}
	}

	c.sections = append(c.sections, section{
		name:    sectionName,
		options: []option{{key, value}},
	})
}
func (c *Config) Set(sectionName, key, value string) {
	for i, sect := range c.sections {
		if sect.name == sectionName {
			for j, opt := range sect.options {
				if opt.name == key {
					c.sections[i].options[j].value = value
					return
				}
			}
			c.sections[i].options = append(sect.options, option{key, value})
			return
		}
	}

	c.sections = append(c.sections, section{
		name:    sectionName,
		options: []option{{key, value}},
	})
}
// Set sets a value for an option in a section. If the option exists, it's
// value will be overwritten. If the option does not exist, it will be added.
// If the section does not exist, it will be added and the option added to it.