ini.go
func (c *Config) AddComment(sect, comment string) {
	if sect == "" {
		c.comments = append(c.comments, comment)
		return
	}

	for i, s := range c.sections {
		if s.name == sect {
			c.sections[i].comments = append(s.comments, comment)
			return
		}
	}

	c.sections = append(c.sections, section{
		name:     sect,
		comments: []string{comment},
	})
}
func (c *Config) AddComment(sect, comment string) {
	if sect == "" {
		c.comments = append(c.comments, comment)
		return
	}

	for i, s := range c.sections {
		if s.name == sect {
			c.sections[i].comments = append(s.comments, comment)
			return
		}
	}

	c.sections = append(c.sections, section{
		name:     sect,
		comments: []string{comment},
	})
}
// AddComments appends the comment to the list of comments for the section.