brokeyourbike/providusbank-api-client-go

View on GitHub

Showing 3 of 3 total issues

Method RequestShort.UnmarshalJSON has 52 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (r *RequestShort) UnmarshalJSON(data []byte) error {
    var requestShort struct {
        SessionID           string            `json:"sessionId"`
        SettlementID        string            `json:"settlementId"`
        ChannelID           string            `json:"channelId"`
Severity: Minor
Found in webhook/webhook.go - About 1 hr to fix

    Method RequestShort.UnmarshalJSON has 6 return statements (exceeds 4 allowed).
    Open

    func (r *RequestShort) UnmarshalJSON(data []byte) error {
        var requestShort struct {
            SessionID           string            `json:"sessionId"`
            SettlementID        string            `json:"settlementId"`
            ChannelID           string            `json:"channelId"`
    Severity: Major
    Found in webhook/webhook.go - About 40 mins to fix

      Method client.do has 6 return statements (exceeds 4 allowed).
      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)
          }
      Severity: Major
      Found in client.go - About 40 mins to fix
        Severity
        Category
        Status
        Source
        Language