Showing 5 of 20 total issues
File filter.go
has 552 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
package notion
import (
"encoding/json"
"time"
Method Client.makeRequest
has 7 return statements (exceeds 4 allowed). Open
Open
func (c *Client) makeRequest(ctx context.Context, method, url string, body io.Reader, respObject interface{}) error {
req, err := http.NewRequestWithContext(ctx, method, url, body)
if err != nil {
return err
}
Method Client.getList
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (c *Client) getList(ctx context.Context, url string, cursor *string, maxResults int, results list) error {
Function unmarshalJSONFlattenByType
has 5 return statements (exceeds 4 allowed). Open
Open
func unmarshalJSONFlattenByType(bt []byte, b typed) error {
if err := json.Unmarshal(bt, b); err != nil {
return err
}
Method SearchResults.UnmarshalJSON
has 5 return statements (exceeds 4 allowed). Open
Open
func (sr *SearchResults) UnmarshalJSON(b []byte) error {
m := make([]map[string]interface{}, 0)
if err := json.Unmarshal(b, &m); err != nil {
return err
}