From 80a2c637d284d341d4700bc8981b74a5ee441a2b Mon Sep 17 00:00:00 2001 From: maru Date: Mon, 8 Apr 2024 17:49:50 -0400 Subject: [PATCH] Indentation consistency near calls to rand.Read --- api/account.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/account.go b/api/account.go index 790bea8..1dd56fe 100644 --- a/api/account.go +++ b/api/account.go @@ -95,7 +95,6 @@ func (s *Server) handleAccountRegister(w http.ResponseWriter, r *http.Request) { } uuid := make([]byte, 16) - _, err = rand.Read(uuid) if err != nil { httpError(w, r, fmt.Sprintf("failed to generate uuid: %s", err), http.StatusInternalServerError) @@ -103,7 +102,6 @@ func (s *Server) handleAccountRegister(w http.ResponseWriter, r *http.Request) { } salt := make([]byte, 16) - _, err = rand.Read(salt) if err != nil { httpError(w, r, fmt.Sprintf("failed to generate salt: %s", err), http.StatusInternalServerError) @@ -158,7 +156,6 @@ func (s *Server) handleAccountLogin(w http.ResponseWriter, r *http.Request) { } token := make([]byte, 32) - _, err = rand.Read(token) if err != nil { httpError(w, r, fmt.Sprintf("failed to generate token: %s", err), http.StatusInternalServerError)