We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第六版 下 预览
span里面有obj,一共67种class, class 0 就是一个大内存
大块内存=span
u, err := url.Parse("http://localhost:8080") host, port, err := net.SplitHostPort(u.Host)
transport.go (t *Transport) dialCon readloop: _, err := pc.br.Peek(1) --这里只看一下,没数据也没事,eof也没事 rc := <-pc.reqch reqch chan requestAndChan // written by roundTrip; read by readLoop pc.readResponse
所以就是read先等write信号,write完,跑read
对于eof pc.readResponse`挂了
2172 ▸ ▸ resp, err = ReadResponse(pc.br, rc.req)¬ | 2173 ▸ ▸ if err != nil {¬ | 2174 ▸ ▸ ▸ return¬ | 2175 ▸ ▸ }¬
应该是这里返回eof了
,所以在go支持很不好,解决办法是 双引号用+ 连接起来,因为双引号不能换号,
var db *sql.DB var err error pool, err := dockertest.NewPool("") pool.MaxWait = time.Minute * 5 if err != nil { log.Fatalf("Could not connect to docker: %s", err) } resource, err := pool.Run("mysql/mysql-server", "8.0", []string{"MYSQL_ROOT_PASSWORD=123456"}) if err != nil { log.Fatalf("Could not start resource: %s", err) } defer func() { if err := pool.Purge(resource); err != nil { log.Fatalf("Could not purge resource: %s", err) } }() fmt.Println("mysql docker exposed port is:" + resource.GetPort("3306/tcp")) if err := pool.Retry(func() error { var err error db, err = sql.Open("mysql", fmt.Sprintf("ut:123456@(localhost:%s)/live", resource.GetPort("3306/tcp"))) if err != nil { spew.Dump(err) return err } //启动阶段不停的重试连接,如果连接上了,则需要授权,让宿主机能连上 //一句话也不能少,因为要建立live的database resource.Exec([]string{"mysql", "-uroot", "-p123456", "-e", `CREATE USER 'ut'@'%' IDENTIFIED BY '123456';`}, dockertest.ExecOptions{}) resource.Exec([]string{"mysql", "-uroot", "-p123456", "-e", `GRANT ALL ON *.* TO 'ut'@'%'`}, dockertest.ExecOptions{}) resource.Exec([]string{"mysql", "-uroot", "-p123456", "-e", `flush privileges;`}, dockertest.ExecOptions{}) resource.Exec([]string{"mysql", "-uroot", "-p123456", "-e", `create database live;`}, dockertest.ExecOptions{}) return db.Ping() }); err != nil { log.Fatalf("Could not connect to database: %s", err) } // 在项目根目录执行: ROOT=`pwd` go test ./... -v -timeout 10000s execSql(db, os.Getenv("ROOT")+"/ddl/ddl.sql")
https://draveness.me/golang/docs/part3-runtime/ch06-concurrency/golang-context/
FindStringSubmatch
最大boss,私有gitlab使用非80,443端口,为什么不用80,443呢?因为如果小企业,电信出口不能暴露80,443。。。。
[url "https://TOKEN:PW@xxx.com:12345/group/project"] insteadOf = https://xxx.com/group/project
GL_DEBUG=loader,gocritic,env,autogen_exclude,nolint golangci-lint run -v --no-config --disable ineffassign --disable deadcode --disable unused --timeout=10m -E gofmt ./...
go tool pprof -http=:8034 http://a30caa4cf1bdc47bf8644e1deb81bd83-839478928.us-east-2.elb.amazonaws.com:8800/debug/pprof/profile
The text was updated successfully, but these errors were encountered:
No branches or pull requests
go 学习笔记
第六版 下 预览
span里面有obj,一共67种class, class 0 就是一个大内存
大块内存=span
go module
http
所以就是read先等write信号,write完,跑read
对于eof pc.readResponse`挂了
应该是这里返回eof了
test & gin
mysql
,所以在go支持很不好,解决办法是 双引号用+ 连接起来,因为双引号不能换号,
里面的``不能转义。。。。ctx
https://draveness.me/golang/docs/part3-runtime/ch06-concurrency/golang-context/
gin
other
FindStringSubmatch
go + gitlab
最大boss,私有gitlab使用非80,443端口,为什么不用80,443呢?因为如果小企业,电信出口不能暴露80,443。。。。
golang-cilint
GL_DEBUG=loader,gocritic,env,autogen_exclude,nolint golangci-lint run -v --no-config --disable ineffassign --disable deadcode --disable unused --timeout=10m -E gofmt ./...
,好了,有个历史老bug:context loading failed: no go files to analyze golangci/golangci-lint#825perf
go tool pprof -http=:8034 http://a30caa4cf1bdc47bf8644e1deb81bd83-839478928.us-east-2.elb.amazonaws.com:8800/debug/pprof/profile
The text was updated successfully, but these errors were encountered: