package main
import (
"fmt"
"net/http"
)
func main() {
client := &http.Client{
Transport: &http.Transport{},
CheckRedirect: func(req *http.Request, via []*http.Request) error {
if len(via) > 0 {
fmt.Printf("%s -> %s\n", via[len(via)-1].URL.String(), req.URL.String())
}
return nil
},
}
res, err := client.Get("...")
}