Skip to content

Commit

Permalink
fix not string key
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviazhang0809 committed Oct 12, 2017
1 parent 84f873a commit 9cbb434
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions codegen/type_converter.go
Expand Up @@ -351,10 +351,7 @@ func (c *TypeConverter) genConverterForMap(
_, isStringKey := toFieldType.KeySpec.(*compile.StringSpec)

if !isStringKey {
keyType, err := c.getGoTypeName(toFieldType.KeySpec)
if err != nil {
return err
}
keyType, _ := c.getGoTypeName(toFieldType.KeySpec)
c.appendf(
"%s = make(map[%s]%s, len(%s))",
toIdentifier, keyType, typeName, sourceIdentifier,
Expand Down

0 comments on commit 9cbb434

Please sign in to comment.