10 ms·
The same things that happens in JS or python. If you get a key wrong it throws (panics in go)
by kloop 2y ago
The same things that happens in JS or python.
If you get a key wrong it throws (panics in go)
- scubbo 2y agoI wasn't talking about getting the keys wrong, but rather the insane verbosity of GoLang - `myVariable := retrievedObject.(map[string]interface{})["firstLevelKey"].(map[string]interface{})["secondLevelKey"].(string)` vs. `myVariable = retrievedObject["firstLevelKey"]["secondLevelKey"]` "Oh, but that's just how it is in strongly-typed languages" - that may well be true, but we're comparing "JS or python" with GoLang here.