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:
committed by
Jack Christensen
parent
ba924e5715
commit
9c2c389e06
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user