Showing 3 of 3 total issues
Method RequestShort.UnmarshalJSON
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (r *RequestShort) UnmarshalJSON(data []byte) error {
var requestShort struct {
SessionID string `json:"sessionId"`
SettlementID string `json:"settlementId"`
ChannelID string `json:"channelId"`
Method RequestShort.UnmarshalJSON
has 6 return statements (exceeds 4 allowed). Open
Open
func (r *RequestShort) UnmarshalJSON(data []byte) error {
var requestShort struct {
SessionID string `json:"sessionId"`
SettlementID string `json:"settlementId"`
ChannelID string `json:"channelId"`
Method client.do
has 6 return statements (exceeds 4 allowed). Open
Open
func (c *client) do(ctx context.Context, req *request) error {
resp, err := c.httpClient.Do(req.req)
if err != nil {
return fmt.Errorf("failed to send request: %w", err)
}