fixed lots of bugs
This commit is contained in:
@@ -45,7 +45,7 @@ func Encode(message string, data map[string]any) ([]byte, error) {
|
||||
|
||||
msg := mt.New().Interface()
|
||||
// map → json → proto
|
||||
jsonBytes, _ := json.Marshal(data)
|
||||
jsonBytes, _ := json.MarshalIndent(data, "", " ")
|
||||
if err := protojson.Unmarshal(jsonBytes, msg); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user