2
0

json: fix implementation of json Unmarshalers.

* AuthenticationMD5Password was wrong and is not needed
* Bind was wrong
* ErrorResponse is not needed
* Minor improvements for reliability
This commit is contained in:
Henrique Vicente
2021-05-17 02:11:29 +02:00
committed by Jack Christensen
parent ba924e5715
commit 9c2c389e06
7 changed files with 530 additions and 106 deletions
+3
View File
@@ -47,6 +47,9 @@ func (e *invalidMessageFormatErr) Error() string {
// getValueFromJSON gets the value from a protocol message representation in JSON.
func getValueFromJSON(v map[string]string) ([]byte, error) {
if v == nil {
return nil, nil
}
if text, ok := v["text"]; ok {
return []byte(text), nil
}