Procházet zdrojové kódy

get general cookie value by their name.

master
Patrick Peng Sun před 8 roky
rodič
revize
93640f949c
1 změnil soubory, kde provedl 7 přidání a 2 odebrání
  1. +7
    -2
      crmpixel.go

+ 7
- 2
crmpixel.go Zobrazit soubor

} }


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) {

Načítá se…
Zrušit
Uložit