mholt / curl-to-go

Convert curl commands to Go code in your browser

Home Page:https://mholt.github.io/curl-to-go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The code is wrong

ppabc opened this issue · comments

commented

Are you requesting support for a new curl flag? If so, what is the flag and the equivalent Go code?
The code is wrong

#curl --resolve www.aqzt.com:80:127.0.0.1 http://www.aqzt.com
// Generated by curl-to-Go: https://mholt.github.io/curl-to-go
resp, err := http.Get("http://www.aqzt.com")
if err != nil {
	// handle err
}
defer resp.Body.Close()

This is not particularly helpful. Can you provide more details? Closing otherwise.