The change to an array of readers comes from e096060b (refactor(core/commands2/add) split loop, 2014-11-06), where it's used to setup readers for each path in the argument list. However, since 6faeee83 (cmds2/add: temp fix for -r. horrible hack, 2014-11-11) the argument looping moved outside of add() and into Run(), so we can drop the multiple-reader support from add(). Adding a file can create multiple nodes (e.g. the splitter can chunk the file into several blocks), but: 1. we were only appending a single node per reader to our returned list, and 2. we are only using the final node in that returned list, so this commit also adjusts add() to return a single node reference instead on an array of nodes.
| 名称 |
最后提交
|
最后更新 |
|---|---|---|
| .. | ||
| commands | 正在载入提交数据... | |
| corehttp | 正在载入提交数据... | |
| corenet | 正在载入提交数据... | |
| corerepo | 正在载入提交数据... | |
| corerouting | 正在载入提交数据... | |
| coreunix | 正在载入提交数据... | |
| .gitignore | 正在载入提交数据... | |
| bootstrap.go | 正在载入提交数据... | |
| bootstrap_test.go | 正在载入提交数据... | |
| builder.go | 正在载入提交数据... | |
| core.go | 正在载入提交数据... | |
| core_test.go | 正在载入提交数据... | |
| mock.go | 正在载入提交数据... | |
| pathresolver.go | 正在载入提交数据... |