go-python / go-python/gopy

A function that returns a []map[string]interface{} is incorrect for integer types

Ouverte
#360 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
2.3k
Forks
136
Merge moyen
14 min
PR mergées (30 j)
2

Description

- A function that returns a []map[string]interface{} is incorrect for integer types

```golang
func Test() ([]map[string]interface{}, error) {
var result []map[string]interface{}
rowMap := make(map[string]interface{})
rowMap["id"] = 1
rowMap["test"] = 2
rowMap["name"] = "adadada"
result = append(result, rowMap)
return result, nil
}
```

```python
print(test())
```

- output:
```
pythonic.Slice_Map_string_interface_ len: 1 handle: 8 [pythonicsql.Map_string_interface_ len: 3 handle: 9 {id=%!s(int=1), test=%!s(int=2), name=adadada, }]
```

Integer types are returned in Python as a string `%!s(int={value})`

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.