[#299] client: Do not use pointers to required response fields

In previous implementation `client` package provided access to nested
response fields as pointers to them. This caused clients to handle nil
cases even when the field presence in the response is required.

Avoid returning pointers to required fields in response getters. This
also reduces reference counter load and allows fields to be decoded
directly without additional assignment.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-08-05 11:56:49 +04:00 committed by Pavel Karpy
parent 30bf79f075
commit 4e31b4f231
10 changed files with 150 additions and 160 deletions

View file

@ -251,7 +251,7 @@ func (x *contextCall) close() bool {
x.result(x.resp)
}
return true
return x.err == nil
}
// goes through all stages of sending a request and processing a response. Returns true if successful.