api: run go fmt

This commit is contained in:
Adhityaa
2018-06-10 23:13:42 +05:30
parent 42a58f1d87
commit 8b0d198934
10 changed files with 27 additions and 28 deletions

View File

@@ -32,7 +32,7 @@ func commenterNew(email string, name string, link string, photo string, provider
}
passwordHash := []byte{}
if (password != "") {
if password != "" {
passwordHash, err = bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
if err != nil {
logger.Errorf("cannot generate hash from password: %v\n", err)
@@ -54,7 +54,6 @@ func commenterNew(email string, name string, link string, photo string, provider
return commenterHex, nil
}
func commenterNewHandler(w http.ResponseWriter, r *http.Request) {
type request struct {
Email *string `json:"email"`