...

Source file src/github.com/gorilla/sessions/cookie_go111.go

Documentation: github.com/gorilla/sessions

     1  // +build go1.11
     2  
     3  package sessions
     4  
     5  import "net/http"
     6  
     7  // newCookieFromOptions returns an http.Cookie with the options set.
     8  func newCookieFromOptions(name, value string, options *Options) *http.Cookie {
     9  	return &http.Cookie{
    10  		Name:     name,
    11  		Value:    value,
    12  		Path:     options.Path,
    13  		Domain:   options.Domain,
    14  		MaxAge:   options.MaxAge,
    15  		Secure:   options.Secure,
    16  		HttpOnly: options.HttpOnly,
    17  		SameSite: options.SameSite,
    18  	}
    19  
    20  }
    21  

View as plain text