소스 검색

add todo

master
Patrick Peng Sun 9 년 전
부모
커밋
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…
취소
저장