Codebase list golang-gopkg-ini.v1 / 79f45f0
parser: remove surrounding quotes for empty value (#97) Unknwon 7 years ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
3636
3737 // Maximum allowed depth when recursively substituing variable names.
3838 _DEPTH_VALUES = 99
39 _VERSION = "1.27.0"
39 _VERSION = "1.27.1"
4040 )
4141
4242 // Version returns current package version literal.
188188 // are quotes \" or \'.
189189 // It returns false if any other parts also contain same kind of quotes.
190190 func hasSurroundedQuote(in string, quote byte) bool {
191 return len(in) > 2 && in[0] == quote && in[len(in)-1] == quote &&
191 return len(in) >= 2 && in[0] == quote && in[len(in)-1] == quote &&
192192 strings.IndexByte(in[1:], quote) == len(in)-2
193193 }
194194