docs(iot): 存量英文注释中文化(仅注释,代码零字节改动)
- 5 个文件:123 行英文注释 → 99 行中文注释(中文更紧凑,内容无删减)。 - 机械校验(git diff -U0 去掉 // 行与空行)输出为空;gofmt -l 干净(改动前亦干净)。 - 验收:go build/vet/test ./internal/iot/... 全绿。
This commit is contained in:
1 parent
127c32b440
commit
2593765add
5 files changed
+99
-123
No files matched your search
@@ -10,8 +10,8 @@ import (
|
||||
"git.yeij.top/AskaEth/Cyrene_v2/internal/config"
|
||||
)
|
||||
|
||||
// fakeProvider is a stub Provider used to exercise Manager.Register and the
|
||||
// device-operation routing without touching the concrete mockProvider.
|
||||
// fakeProvider 是桩 Provider,用于验证 Manager.Register 与设备操作路由,
|
||||
// 而不触碰具体的 mockProvider。
|
||||
type fakeProvider struct {
|
||||
name string
|
||||
device Device
|
||||
@@ -40,7 +40,7 @@ func (f fakeProvider) Status(_ context.Context, id string) (*Device, error) {
|
||||
return &cp, nil
|
||||
}
|
||||
|
||||
// recvIoT blocks until a DeviceUpdate is delivered or the deadline passes.
|
||||
// recvIoT 阻塞等待,直到收到一条 DeviceUpdate 或超过等待时限。
|
||||
func recvIoT(t *testing.T, ch <-chan DeviceUpdate, d time.Duration) DeviceUpdate {
|
||||
t.Helper()
|
||||
select {
|
||||
|
||||
Reference in new issue
Block a user