Open igorastds opened 7 years ago
TL;DR: bug.json: {"Head": {"StepSize": 2,"Hacks": {"Backup": {"A": 1,"Users": [1, 2, 3, 4],"S":"S"}}}}
{"Head": {"StepSize": 2,"Hacks": {"Backup": {"A": 1,"Users": [1, 2, 3, 4],"S":"S"}}}}
cfg.Load("bug.json") foo struct { Hacks struct { Backup struct { Users []int } } } x: cfg.Configure(&foo, "Head") if len(foo.Hacks.Backup.Users) < 1 { tries++ goto x } log.Println(fmt.Sprintf("ok done, took %d tries, got %v", tries, foo.Hacks.Backup.Users))
The results to get this structure parsed are varying between taking 8000 - 160000 tries on my machine, and this is not even supposed to work I guess. Test code: http://pastebin.com/FLQVtDYZ, tested on 1.6.2 and 1.8
Issue confirmed. I will look into it. Thanks!
TL;DR: bug.json:
{"Head": {"StepSize": 2,"Hacks": {"Backup": {"A": 1,"Users": [1, 2, 3, 4],"S":"S"}}}}
The results to get this structure parsed are varying between taking 8000 - 160000 tries on my machine, and this is not even supposed to work I guess. Test code: http://pastebin.com/FLQVtDYZ, tested on 1.6.2 and 1.8