-
Notifications
You must be signed in to change notification settings - Fork 114
guonaihong edited this page Sep 28, 2019
·
5 revisions
安装有两种方式
这种方式有个缺点,需要自己下载依赖
env GOPATH=`pwd` go get github.com/guonaihong/gout
mkdir use_gout
go mod init main #关键一步
package main
import (
"fmt"
"github.com/guonaihong/gout"
)
func main() {
s := ""
err := gout.GET("http://www.qq.com").BindBody(&s).Do()
if err != nil {
fmt.Printf("%s\n", err)
return
}
fmt.Printf("%s\n", s)
}
这种方式有个有优点,自动下载依赖
env GOPROXY=https://goproxy.cn go run t.go