使用标准库http来实现
package tools import ( "io/IoUtil" net/http" ) func Get(url string)string{ res,err :=http.Get(url) if err != nil { return "" } robots,1)"> IoUtil.ReadAll(res.Body) res.Body.Close() } return (robots) }