PR #36011 fixed almost all of the golint issues though
there is still one golint error:
https://goreportcard.com/report/github.com/docker/docker#golint
```
Golint is a linter for Go source code.
docker/daemon/reload.go
Line 64: warning: redundant if ...; err != nil check, just return error instead. (golint)
```
This fix fixes the last one.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
| ... | ... |
@@ -61,10 +61,7 @@ func (daemon *Daemon) Reload(conf *config.Config) (err error) {
|
| 61 | 61 |
if err := daemon.reloadLiveRestore(conf, attributes); err != nil {
|
| 62 | 62 |
return err |
| 63 | 63 |
} |
| 64 |
- if err := daemon.reloadNetworkDiagnosticPort(conf, attributes); err != nil {
|
|
| 65 |
- return err |
|
| 66 |
- } |
|
| 67 |
- return nil |
|
| 64 |
+ return daemon.reloadNetworkDiagnosticPort(conf, attributes) |
|
| 68 | 65 |
} |
| 69 | 66 |
|
| 70 | 67 |
// reloadDebug updates configuration with Debug option |