func (c *ConfigFile) DeleteKey(section, key string) bool {
	if len(section) == 0 {
		section = DEFAULT_SECTION
	}
	if _, ok := c.data[section]; !ok {
		return false
	}
	if _, ok := c.data[section][key]; ok {
		delete(c.data[section], key)
		c.SetKeyComments(section, key, "")
		i := 0
		for _, keyName := range c.keyList[section] {
			if keyName == key {
				break
			}
			i++
		}
		c.keyList[section] = append(c.keyList[section][:i], c.keyList[section][i+1:]...)
		return true
	}
	return false
}
DeleteKey deletes the key in given section.
It returns true if the key was deleted,
or returns false if the section or key didn't exist.
package goconfig
import (
	"fmt"
	"regexp"
	"runtime"
	"strconv"
	"strings"
	"sync"
)
const (
	DEFAULT_SECTION = "DEFAULT"
	_DEPTH_VALUES = 200
)
const (
	ErrSectionNotFound = iota + 1
	ErrKeyNotFound
	ErrBlankSectionName
	ErrCouldNotParse
)
var LineBreak = "\n"
var varPattern = regexp.MustCompile(`%\(([^\)]+)\)s`)
func init() {
	if runtime.GOOS == "windows" {
		LineBreak = "\r\n"
	}
}
type ConfigFile struct {
	lock      sync.RWMutex                  
	fileNames []string                      
	data      map[string]map[string]string  
	sectionList []string             
	keyList     map[string][]string  
	sectionComments map[string]string             
	keyComments     map[string]map[string]string  
	BlockMode       bool                          
}
func newConfigFile(fileNames []string) *ConfigFile {
	c := new(ConfigFile)
	c.fileNames = fileNames
	c.data = make(map[string]map[string]string)
	c.keyList = make(map[string][]string)
	c.sectionComments = make(map[string]string)
	c.keyComments = make(map[string]map[string]string)
	c.BlockMode = true
	return c
}
func (c *ConfigFile) SetValue(section, key, value string) bool {
	if c.BlockMode {
		c.lock.Lock()
		defer c.lock.Unlock()
	}
	if len(section) == 0 {
		section = DEFAULT_SECTION
	}
	if _, ok := c.data[section]; !ok {
		c.data[section] = make(map[string]string)
		c.sectionList = append(c.sectionList, section)
	}
	_, ok := c.data[section][key]
	c.data[section][key] = value
	if !ok {
		c.keyList[section] = append(c.keyList[section], key)
	}
	return !ok
}