The pkg.Interface style is modeled after heap.Interface. Generally, I find it helpful for interfaces that have many implementations. It provides clear distinction between the generic interface and the |n| implementations that implement it (which may be interface types themselves). For clients who cannot keep the repo name, one can imagine that the most likely rename is `ipfsrepo`. In that case, `ipfsrepo.Interface` remains meaningful. This is low-pri so it doesn't matter than much. But for the record, the repo.Interface feels appropriate in this use-case.
| 名称 |
最后提交
|
最后更新 |
|---|---|---|
| .. | ||
| commands | 正在载入提交数据... | |
| daemon | 正在载入提交数据... | |
| io | 正在载入提交数据... | |
| .gitignore | 正在载入提交数据... | |
| bootstrap.go | 正在载入提交数据... | |
| bootstrap_test.go | 正在载入提交数据... | |
| core.go | 正在载入提交数据... | |
| core_test.go | 正在载入提交数据... | |
| datastore.go | 正在载入提交数据... | |
| mock.go | 正在载入提交数据... |