LinkinStars commented on code in PR #1122:
URL: https://github.com/apache/incubator-answer/pull/1122#discussion_r1800780724
##########
plugin/importer.go:
##########
@@ -30,7 +32,11 @@ type QuestionImporterInfo struct {
type Importer interface {
Base
- GetQuestion(ctx *gin.Context) (questionInfo *QuestionImporterInfo, err
error)
+ RegisterImporterFunc(ctx context.Context, importer ImporterFunc)
+}
+
+type ImporterFunc interface {
+ AddQuestion(ctx context.Context, questionInfo QuestionImporterInfo)
Review Comment:
It's better to return an error here. `AddQuestion(ctx context.Context,
questionInfo QuestionImporterInfo) (err error)`
--
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]