config/config.go
func (c *Config) WriteTo(filename string) error {
	content := ""
	for k, v := range c.config {
		format := "%v = %v\n"
		if k != "" {
			content += fmt.Sprintf("[%v]\n", k)
			format = "\t" + format
		}
		for key, value := range v {
			content += fmt.Sprintf(format, key, value)
		}
	}
	return ioutil.WriteFile(filename, []byte(content), 0644)
}
func (c *Config) WriteTo(filename string) error {
	content := ""
	for k, v := range c.config {
		format := "%v = %v\n"
		if k != "" {
			content += fmt.Sprintf("[%v]\n", k)
			format = "\t" + format
		}
		for key, value := range v {
			content += fmt.Sprintf(format, key, value)
		}
	}
	return ioutil.WriteFile(filename, []byte(content), 0644)
}
// WriteTo function writes the configuration to a new file. This function
// re-organizes the configuration and deletes all the comments.