func (ini *INI) GetBool(key string) (bool, bool) {
    return ini.SectionGetBool(DefaultSection, key)
}
GetBool returns the boolean value represented by the string.
It accepts "1", "t", "T", "true", "TRUE", "True", "on", "ON", "On", "yes", "YES", "Yes" as true
and "0", "f", "F", "false", "FALSE", "False", "off", "OFF", "Off", "no", "NO", "No" as false
Any other value returns false.
package goini
import (
    "bufio"
    "bytes"
    "errors"
    "io"
    "io/ioutil"
    "log"
    "strconv"
)
var _ = log.Printf
type Kvmap map[string]string
type SectionMap map[string]Kvmap
const (
    DefaultSection           = ""
    DefaultLineSeparator     = "\n"
    DefaultKeyValueSeparator = "="
)
type INI struct {
    sections     SectionMap
    lineSep      string
    kvSep        string
    parseSection bool
    skipCommits  bool
    trimQuotes   bool  
}
func New() *INI {
    ini := &INI{
        sections:     make(SectionMap),
        lineSep:      DefaultLineSeparator,
        kvSep:        DefaultKeyValueSeparator,
        parseSection: false,
        skipCommits:  false,
    }
    return ini
}
func (ini *INI) ParseFile(filename string) error {
    contents, err := ioutil.ReadFile(filename)
    if err != nil {
        return err
    }
    ini.parseSection = true
    ini.skipCommits = true
    return ini.parseINI(contents, DefaultLineSeparator, DefaultKeyValueSeparator)
}
func (ini *INI) Parse(data []byte, lineSep, kvSep string) error {
    return ini.parseINI(data, lineSep, kvSep)
}
func (ini *INI) ParseFrom(r io.Reader, lineSep, kvSep string) error {
    data, err := ioutil.ReadAll(r)
    if err == nil {
        return ini.parseINI(data, lineSep, kvSep)
    }
    return err
}
func (ini *INI) Reset() {
    ini.sections = make(SectionMap)
}
func (ini *INI) SetSkipCommits(skipCommits bool) {
    ini.skipCommits = skipCommits
}
func (ini *INI) SetParseSection(parseSection bool) {
    ini.parseSection = parseSection
}
func (ini *INI) SetTrimQuotes(v bool) {
    ini.trimQuotes = v
}
func (ini *INI) Get(key string) (string, bool) {
    return ini.SectionGet(DefaultSection, key)
}
func (ini *INI) GetInt(key string) (int, bool) {
    return ini.SectionGetInt(DefaultSection, key)
}
func (ini *INI) GetFloat(key string) (float64, bool) {
    return ini.SectionGetFloat(DefaultSection, key)
}