阶段十:完成 Go Chat 注释基线清零
This commit is contained in:
1 parent
c9ac336547
commit
a45a82a149
5 files changed
+300
-1851
No files matched your search
@@ -46,7 +46,9 @@ func (*fakeRepository) UpdateMessageStatus(_ context.Context, _ string, _ string
|
||||
func TestServiceUsesNarrowRepository(t *testing.T) {
|
||||
// repository 是只实现聊天所需方法的内存替身。
|
||||
repository := &fakeRepository{accountIDs: []string{"account-1", "account-2"}}
|
||||
// service 保存service,供当前处理流程使用
|
||||
service := NewWithRepository(repository)
|
||||
// cancel、err 保存cancel、err,供当前处理流程使用
|
||||
_, cancel, err := service.Subscribe(context.Background(), 42)
|
||||
if err != nil {
|
||||
t.Fatalf("Subscribe() error = %v", err)
|
||||
|
||||
Reference in new issue
Block a user