소스 검색

get general cookie value by their name.

master
Patrick Peng Sun 9 년 전
부모
커밋
93640f949c
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. +7
    -2
      crmpixel.go

+ 7
- 2
crmpixel.go 파일 보기

} }


func getLeadIDFromCookie(r *http.Request) (leadID string, ok bool) { func getLeadIDFromCookie(r *http.Request) (leadID string, ok bool) {
return cookieVerifyAndGet(r, cookLeadID)
}

func cookieVerifyAndGet(r *http.Request, name string) (value string, ok bool) {
ok = false ok = false
cookie, leadok := r.Cookie(cookLeadID) //crm lead
cookie, leadok := r.Cookie(name)
if leadok != nil { if leadok != nil {
return return
} }
return return
} }
ok = true ok = true
leadID = s[0]
value = s[0]
return return

} }


func createNewCookie(r *http.Request) (ret http.Cookie, info crmdLead) { func createNewCookie(r *http.Request) (ret http.Cookie, info crmdLead) {

Loading…
취소
저장