Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for perURL (0.1 sec)

  1. src/net/http/client_test.go

    type TestJar struct {
    	m      sync.Mutex
    	perURL map[string][]*Cookie
    }
    
    func (j *TestJar) SetCookies(u *url.URL, cookies []*Cookie) {
    	j.m.Lock()
    	defer j.m.Unlock()
    	if j.perURL == nil {
    		j.perURL = make(map[string][]*Cookie)
    	}
    	j.perURL[u.Host] = cookies
    }
    
    func (j *TestJar) Cookies(u *url.URL) []*Cookie {
    	j.m.Lock()
    	defer j.m.Unlock()
    	return j.perURL[u.Host]
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 63.8K bytes
    - Viewed (0)
Back to top