Original post

I have a method whose signature is as follows

func Login(client pkg.HTTPClient, userName, password string) ([]*http.Cookie, error) {}```

Here pkg.HTTPClient is an interface as follows:

    package pkg

    type HTTPClient interface {
        Do(req *http.Request) (*http.Response, error)

My intention is to mock the client.Do method and also set cookies in the response of client.Do

I am not sure how to do this because when I inspect the http.Response object I don’t see a way to set cookies