Skip to content

Commit fa01852

Browse files
committed
Removed writing to an arg passed by value in getUser function
1 parent 7967a29 commit fa01852

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

030_sessions/03_signup/session.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package main
22

33
import (
4-
"github.com/satori/go.uuid"
54
"net/http"
5+
6+
"github.com/satori/go.uuid"
67
)
78

89
func getUser(w http.ResponseWriter, req *http.Request) user {
@@ -16,7 +17,8 @@ func getUser(w http.ResponseWriter, req *http.Request) user {
1617
}
1718

1819
}
19-
http.SetCookie(w, c)
20+
//Next line may not be required, commenting it
21+
// http.SetCookie(w, c)
2022

2123
// if the user exists already, get user
2224
var u user

0 commit comments

Comments
 (0)