From b90d39dfda457710c8c852d10b235c3b930ed502 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 23 Jan 2019 15:58:06 +0000 Subject: [PATCH] fix: linting License: MIT Signed-off-by: Henrique Dias --- users/storage.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/users/storage.go b/users/storage.go index 7656d0fc..3de6d247 100644 --- a/users/storage.go +++ b/users/storage.go @@ -89,11 +89,11 @@ func (s *Storage) Save(user *User) error { // id must be a string for username lookup or a uint for id lookup. If id // is neither, a ErrInvalidDataType will be returned. func (s *Storage) Delete(id interface{}) (err error) { - switch id.(type) { + switch id := id.(type) { case string: - err = s.back.DeleteByUsername(id.(string)) + err = s.back.DeleteByUsername(id) case uint: - err = s.back.DeleteByID(id.(uint)) + err = s.back.DeleteByID(id) default: err = errors.ErrInvalidDataType }