Source File
flash.go
Belonging Package
golang.org/x/pkgsite/internal/cookie
package cookie
import (
)
const AlternativeModuleFlash = "tmp-redirected-from-alternative-module"
func ( http.ResponseWriter, *http.Request, string) ( string, error) {
defer derrors.Wrap(&, "Extract")
, := .Cookie()
if != nil && != http.ErrNoCookie {
return "", fmt.Errorf("r.Cookie(%q): %v", , )
}
if == nil {
return "", nil
}
, := Base64Value()
if != nil {
return "",
}
http.SetCookie(, &http.Cookie{
Name: ,
Path: .URL.Path,
Expires: time.Unix(0, 0),
})
return , nil
}
func ( http.ResponseWriter, , , string) {
:= base64.URLEncoding.EncodeToString([]byte())
http.SetCookie(, &http.Cookie{Name: , Value: , Path: })
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |