A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ksonnet/ksonnet/commit/833a76dfc63f9b33adc674445bdebf4646cd2a15 below:

decode string with leading 0 as string · ksonnet/ksonnet@833a76d · GitHub

This repository was archived by the owner on Sep 9, 2020. It is now read-only.

File tree Expand file treeCollapse file tree 2 files changed

+7

-2

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+7

-2

lines changed Original file line number Diff line number Diff line change

@@ -248,8 +248,8 @@ func arrayValues(array *ast.Array) ([]interface{}, error) {

248 248

}

249 249 250 250

var (

251 -

reFloat = regexp.MustCompile(`^[-+]?[0-9]*\.?[0-9]+$`)

252 -

reInt = regexp.MustCompile(`^([+-]?[1-9]\d*|0)$`)

251 +

reFloat = regexp.MustCompile(`^[-+]?(0|[1-9]\d+)(\.[0-9]+)*$`)

252 +

reInt = regexp.MustCompile(`^([+-]?[1-9]\d*|0{1})$`)

253 253

reArray = regexp.MustCompile(`^\[`)

254 254

reMap = regexp.MustCompile(`^\{`)

255 255

)

Original file line number Diff line number Diff line change

@@ -241,6 +241,11 @@ func TestDecodeValue(t *testing.T) {

241 241

val: "0",

242 242

expected: 0,

243 243

},

244 +

{

245 +

name: "00",

246 +

val: "00",

247 +

expected: "00",

248 +

},

244 249

{

245 250

name: "bool true",

246 251

val: "True",

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4