When setting config keys, the program doesn't know whether the key-to-be-modified exists on the Config struct. (Perhaps, with reflection, it is possible to find the field). To allow callers to write non-existent keys, the program would... Before: 1) converts the in-memory *Config to a map 2) sets the key on the map, and 3) writes this map to disk. 4) Then, it converts this map back into an in-memory struct. This commit swaps 3 and 4 so the map can be validated against the struct before being written to disk. This prevents the bug identified in #740.
| 名称 |
最后提交
|
最后更新 |
|---|---|---|
| Godeps | 正在载入提交数据... | |
| assets | 正在载入提交数据... | |
| bin | 正在载入提交数据... | |
| blocks | 正在载入提交数据... | |
| blockservice | 正在载入提交数据... | |
| cmd | 正在载入提交数据... | |
| commands | 正在载入提交数据... | |
| core | 正在载入提交数据... | |
| diagnostics | 正在载入提交数据... | |
| docs | 正在载入提交数据... | |
| exchange | 正在载入提交数据... | |
| fuse | 正在载入提交数据... | |
| importer | 正在载入提交数据... | |
| jenkins | 正在载入提交数据... | |
| merkledag | 正在载入提交数据... | |
| namesys | 正在载入提交数据... | |
| notifications | 正在载入提交数据... | |
| p2p | 正在载入提交数据... | |
| path | 正在载入提交数据... | |
| pin | 正在载入提交数据... | |
| repo | 正在载入提交数据... | |
| routing | 正在载入提交数据... | |
| server/http | 正在载入提交数据... | |
| test | 正在载入提交数据... | |
| thirdparty | 正在载入提交数据... | |
| tour | 正在载入提交数据... | |
| unixfs | 正在载入提交数据... | |
| updates | 正在载入提交数据... | |
| util | 正在载入提交数据... | |
| .dockerignore | 正在载入提交数据... | |
| .gitignore | 正在载入提交数据... | |
| .travis.yml | 正在载入提交数据... | |
| CHANGELOG.md | 正在载入提交数据... | |
| Dockerfile | 正在载入提交数据... | |
| LICENSE | 正在载入提交数据... | |
| Makefile | 正在载入提交数据... | |
| README.md | 正在载入提交数据... | |
| dev.md | 正在载入提交数据... | |
| doc.go | 正在载入提交数据... |