diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-05-11 12:52:32 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-05-11 12:52:32 +0900 |
commit | 5653720231990e485026d33666ee35141efc499c (patch) | |
tree | 5e28e32a0fde2ecb882556eda36bfd66c5900744 | |
parent | 04f36f09a17c45f09f103dc167caf0fbdb721578 (diff) |
mrt: Improve golint result
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
-rw-r--r-- | server/mrt.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/mrt.go b/server/mrt.go index a6becd08..54e774d3 100644 --- a/server/mrt.go +++ b/server/mrt.go @@ -392,12 +392,12 @@ func (m *mrtManager) enable(c *config.MrtConfig) error { } func (m *mrtManager) disable(c *config.MrtConfig) error { - if w, ok := m.writer[c.FileName]; !ok { + w, ok := m.writer[c.FileName] + if !ok { return fmt.Errorf("%s doesn't exists", c.FileName) - } else { - w.Stop() - delete(m.writer, c.FileName) } + w.Stop() + delete(m.writer, c.FileName) return nil } |