草庐IT

ERROR_PIPE_BUSY

全部标签

go - 在 Heroku 上获取零星的 "http: proxy error: read tcp: i/o timeout"

关闭。这个问题需要debuggingdetails.它目前不接受答案。编辑问题以包含desiredbehavior,aspecificproblemorerror,andtheshortestcodenecessarytoreproducetheproblem.这将有助于其他人回答问题。关闭4年前。Improvethisquestion我在Heroku上偶尔会遇到这个错误:代理服务:Dec2714:53:05betalo-turnpike-productionapp/web.2:{[...]}Dec2714:53:08my-proxyapp/web.2:{"level":"error"

go - 是什么原因导致 "panic: runtime error: invalid memory address or nil pointer dereference"?

关闭。这个问题是notreproducibleorwascausedbytypos.它目前不接受答案。这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topic在这里,这个问题的解决方式不太可能帮助future的读者。关闭3年前。Improvethisquestion我的项目有问题。出现错误:panic:runtimeerror:invalidmemoryaddressornilpointerdereference[signalSIGSEGV:segmentationviolationcode=0x1addr=0x0pc=0x44c16f]我做错了什么?套餐Ap

go - 我可以使用指向 "error"的指针来捕获返回错误吗?

我正在编写一些事务开始/提交/回滚函数,我想将block配对以防止忘记提交我是这样写的:func(foo*Foo)Bar()(errerror){foo.Begin()deferfoo.End(&err)//somebusinesscodereturn}func(foo*Foo)End(eptr*error){//ifrecoverifr:=recover();r!=nil{debug.PrintStack()*eptr=r.(error)}varerr=*eptriferr!=nil{foo.Rollback()}else{foo.Commit()}}它有效,但它使用“接口(inte

go - main func 上的 reviced channel error 但是 goroutine 中的 if reviced progrenn 没有错误

我通过goroutine将数据发送到channel。当我想在主函数中接收它时,在channel的最后一次接收时出现死锁,packagemainimport("time""fmt")funcsender(chchanstring){ch输出:printresult%schenlprintresult%szhangsprintresult%slisifatalerror:allgoroutinesareasleep-deadlock!goroutine1[chanreceive]:main.main()但是,如果我也在goroutine中替换接收到的进度,则没有错误orrced。有人可以帮

go - 库/pq : Runtime error when querying a database

我正在为我的Go后端设置一个PostgreSQL数据库,但是我在尝试读取一个表时遇到了这个错误:runtimeerror:invalidmemoryaddressornilpointerdereference/FwzFiles/go/src/runtime/panic.go:82(0x4423b0)panicmem:panic(memoryError)/FwzFiles/go/src/runtime/signal_unix.go:390(0x4421df)sigpanic:panicmem()/FwzFiles/go/src/database/sql/sql.go:1080(0x4e5

go - 我收到错误 fatal error : runtime: out of memory while downloading video using 'go-ipfs-api'

我使用go-ipfs-api从ipfs下载了一个大文件,web访问下载。我收到一个fatalerror:runtime:outofmemory.如何修改我的代码?funcmain(){http.HandleFunc("/",download)http.ListenAndServe(":8080",nil)}funcdownload(whttp.ResponseWriter,r*http.Request){client:=shell.NewShell("http://127.0.0.1:5001")fd,err:=client.Cat("QmTcj7SfRf4vnLnCqnxMT7kut

google-app-engine - 在服务器端处理带有 "io.Pipe"的大文件上传

作为我学习过程的一部分,我最近开始了一项新的挑战,即使用golang创建一个照片马赛克Web应用程序。由于我计划将其托管在AppEngine上,因此我将其分为2个服务:1个用于处理图像上传,另一个用于处理图像。我在这里想要完成的是在接收到第一个字节后立即开始处理图像。在做我的研究时,我遇到了这个要点cryptix/client.go.我需要使用这种方法将请求读入io.Pipe,然后将其动态传输到我的图像处理服务,但我的谷歌搜索没有任何帮助:我想要Go时,只能看到GO客户端发送文件服务器接收文件。注意:这两个服务通过HTTP进行通信。我正在使用REST模式(无html形式:使用POSTM

go - 接口(interface)的结构嵌入, panic : runtime error

我正在尝试一个与接口(interface)的结构嵌入相关的示例//https://talks.golang.org/2014/go4java.slide#52//Structembeddingofinterfaces//https://play.golang.org/p/SYiZ7M1OEhUpackagemainimport("bytes""fmt""net")//net.ConnhasReadandWritetypeloopBackstruct{net.Connbufbytes.Buffer}func(c*loopBack)Read(b[]byte)(int,error){fmt.

string - 为什么 Error() 优先于 String()

我一直在寻找go的游览,但我不明白为什么会这样。当您有一个Stringer(String()string)时,fmt将使用该方法打印到控制台。就像https://tour.golang.org/methods/6中的建议一样但是,如果您添加Error()string,将调用此方法而不是String()string。packagemainimport"fmt"typePersonstruct{NamestringAgeint}func(p*Person)String()string{returnfmt.Sprintf("%v(%vyears)",p.Name,p.Age)}func(p*

go - 无法将错误转换为 go-sqlite3.Error

关闭。这个问题是notreproducibleorwascausedbytypos.它目前不接受答案。这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topic在这里,这个问题的解决方式不太可能帮助future的读者。关闭3年前。Improvethisquestion我试图将Go中的错误转换为go-sqlite3.Error,但它总是失败。上图代表我的调试窗口的快照,它显示错误是go-sqlite3.Error类型我正在使用下面的代码进行类型转换。import("github.com/mattn/go-sqlite3")iferr!=nil{ifsqlite3E