keon94 commented on code in PR #2416:
URL: https://github.com/apache/incubator-devlake/pull/2416#discussion_r929267284


##########
plugins/helper/api_collector.go:
##########
@@ -75,6 +77,8 @@ type ApiCollectorArgs struct {
        Concurrency    int
        ResponseParser func(res *http.Response) ([]json.RawMessage, error)
        AfterResponse  common.ApiClientAfterResponse
+
+       Extract func(row *RawData) (models []interface{}, latestUpdated 
*time.Time, err error)

Review Comment:
   it's a matter of preference to some degree, but I suggest we wrap the 
returned _models_ and _latestUpdated_ in a struct to logically group the 
returned arguments. It also enables us to easily extend the # of params 
returned if needed later with minimal code change



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to