While technically legal to assign a map literal to a struct declaration, it only works in the case where all the struct field types are String, which is often not the case. It is safer to use an object literal (in 1.0) or struct literal (in 1.1 and development).
While technically legal to assign a map literal to a struct declaration, it only works in the case where all the struct field types are
String
, which is often not the case. It is safer to use an object literal (in 1.0) or struct literal (in 1.1 and development).