Mod: if-else format
diff --git a/request.go b/request.go
index b2cd0ec..f74a224 100644
--- a/request.go
+++ b/request.go
@@ -323,11 +323,10 @@
 	}
 	if v, ok := attachments.(map[interface{}]interface{}); ok {
 		req[6] = ToMapStringString(v)
-	} else {
-		return perrors.Errorf("get wrong attachments: %+v", attachments)
+		return nil
 	}
 
-	return nil
+	return perrors.Errorf("get wrong attachments: %+v", attachments)
 }
 
 func ToMapStringString(origin map[interface{}]interface{}) map[string]string {