Patrick Peng Sun пре 8 година
родитељ
комит
aa4c168e81
1 измењених фајлова са 2 додато и 0 уклоњено
  1. +2
    -0
      main.go

+ 2
- 0
main.go Прегледај датотеку

//redirect user to a URL "/pages/dashboard" //redirect user to a URL "/pages/dashboard"
// //
func initialRegistrationHandler(w http.ResponseWriter, r *http.Request) { func initialRegistrationHandler(w http.ResponseWriter, r *http.Request) {
//TODO: verify url parameters and make sure its username is correctly set
//
expiration := time.Now().Add(10 * 365 * 24 * time.Hour) expiration := time.Now().Add(10 * 365 * 24 * time.Hour)
str := time.Now().String() str := time.Now().String()
cookie := http.Cookie{Name: "username", Value: str, Expires: expiration} cookie := http.Cookie{Name: "username", Value: str, Expires: expiration}

Loading…
Откажи
Сачувај