@@ -91,25 +91,25 @@ func (ini *INI) SetParseSection(parseSection bool) {
9191
9292// Get looks up a value for a key in the default section
9393// and returns that value, along with a boolean result similar to a map lookup.
94- func (ini * INI ) Get (key string ) (value string , ok bool ) {
94+ func (ini * INI ) Get (key string ) (string , bool ) {
9595 return ini .SectionGet (DefaultSection , key )
9696}
9797
9898// GetInt gets value as int
99- func (ini * INI ) GetInt (key string ) (value int , ok bool ) {
99+ func (ini * INI ) GetInt (key string ) (int , bool ) {
100100 return ini .SectionGetInt (DefaultSection , key )
101101}
102102
103103// GetFloat gets value as float64
104- func (ini * INI ) GetFloat (key string ) (value float64 , ok bool ) {
104+ func (ini * INI ) GetFloat (key string ) (float64 , bool ) {
105105 return ini .SectionGetFloat (DefaultSection , key )
106106}
107107
108108// GetBool returns the boolean value represented by the string.
109109// It accepts "1", "t", "T", "true", "TRUE", "True", "on", "ON", "On", "yes", "YES", "Yes" as true
110110// and "0", "f", "F", "false", "FALSE", "False", "off", "OFF", "Off", "no", "NO", "No" as false
111111// Any other value returns false.
112- func (ini * INI ) GetBool (key string ) (value bool , ok bool ) {
112+ func (ini * INI ) GetBool (key string ) (bool , bool ) {
113113 return ini .SectionGetBool (DefaultSection , key )
114114}
115115
@@ -123,7 +123,7 @@ func (ini *INI) SectionGet(section, key string) (value string, ok bool) {
123123}
124124
125125// SectionGetInt gets value as int
126- func (ini * INI ) SectionGetInt (section , key string ) (value int , ok bool ) {
126+ func (ini * INI ) SectionGetInt (section , key string ) (int , bool ) {
127127 v , ok := ini .SectionGet (section , key )
128128 if ok {
129129 v , err := strconv .Atoi (v )
@@ -136,7 +136,7 @@ func (ini *INI) SectionGetInt(section, key string) (value int, ok bool) {
136136}
137137
138138// SectionGetFloat gets value as float64
139- func (ini * INI ) SectionGetFloat (section , key string ) (value float64 , ok bool ) {
139+ func (ini * INI ) SectionGetFloat (section , key string ) (float64 , bool ) {
140140 v , ok := ini .SectionGet (section , key )
141141 if ok {
142142 v , err := strconv .ParseFloat (v , 64 )
@@ -149,7 +149,7 @@ func (ini *INI) SectionGetFloat(section, key string) (value float64, ok bool) {
149149}
150150
151151// SectionGetBool gets a value as bool. See GetBool for more detail
152- func (ini * INI ) SectionGetBool (section , key string ) (value bool , ok bool ) {
152+ func (ini * INI ) SectionGetBool (section , key string ) (bool , bool ) {
153153 v , ok := ini .SectionGet (section , key )
154154 if ok {
155155 switch v {
0 commit comments