You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
398 B

package service
import (
"context"
"practice_ArticleVote_Go/internal/model/do"
)
type IArticle interface {
AddArticle(ctx context.Context, article do.Article) (Aid int64, err error)
}
var localArticle IArticle
func Article() IArticle {
if localArticle == nil {
panic("IArticle接口未实现或未注册")
}
return localArticle
}
func RegisterArticle(i IArticle) {
localArticle = i
}