第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

thrift go 報(bào)錯(cuò)not enough arguments in call to oprot.Flush

thrift go 報(bào)錯(cuò)not enough arguments in call to oprot.Flush

PHP
手掌心 2019-03-10 22:42:19
go 作為服務(wù)端與php通信,服務(wù)端代碼如下s.go package main import ( "hello/world" "fmt" "git.apache.org/thrift.git/lib/go/thrift" ) const ( NetworkAddr = "0.0.0.0:10086" ) type helloThrift struct { } func (this *helloThrift) HelloName(name string) (string,err){ return (name + "111"),nil; } func main() { transportFactory := thrift.NewTFramedTransportFactory(thrift.NewTTransportFactory()) protocolFactory := thrift.NewTBinaryProtocolFactoryDefault() //protocolFactory := thrift.NewTCompactProtocolFactory() serverTransport, err := thrift.NewTServerSocket(NetworkAddr) if err != nil { fmt.Println("Error!", err) os.Exit(1) } handler := &idoallThrift{} processor := HelloWorld.NewHelloWorldProcessor(handler) server := thrift.NewTSimpleServer4(processor, serverTransport, transportFactory, protocolFactory) fmt.Println("thrift server in", NetworkAddr) server.Serve() } 執(zhí)行g(shù)o run s.go但是報(bào)錯(cuò)如下: # hello/world hello/world/helloworld.go:77:20: not enough arguments in call to oprot.Flush have () want (context.Context) hello/world/helloworld.go:101:15: cannot assign 1 values to 2 variables hello/world/helloworld.go:147:34: cannot use helloWorldProcessorHelloName literal (type *helloWorldProcessorHelloName) as type thrift.TProcessorFunction in assignment: *helloWorldProcessorHelloName does not implement thrift.TProcessorFunction (wrong type for Process method) have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException) want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException) hello/world/helloworld.go:157:27: not enough arguments in call to processor.Process have (int32, thrift.TProtocol, thrift.TProtocol) want (context.Context, int32, thrift.TProtocol, thrift.TProtocol) hello/world/helloworld.go:165:13: not enough arguments in call to oprot.Flush have () want (context.Context) hello/world/helloworld.go:182:14: not enough arguments in call to oprot.Flush have () want (context.Context) hello/world/helloworld.go:195:14: not enough arguments in call to oprot.Flush have () want (context.Context) hello/world/helloworld.go:209:23: not enough arguments in call to oprot.Flush have () want (context.Context) 有人遇到過這個(gè)問題嘛?hello/world/helloworld.go是通過thrift生成的。。。。
查看完整描述

4 回答

?
慕尼黑8549860

TA貢獻(xiàn)1818條經(jīng)驗(yàn) 獲得超11個(gè)贊

到GOPATH thrift目錄下 然后git checkout 0.10

查看完整回答
反對(duì) 回復(fù) 2019-03-18
?
精慕HU

TA貢獻(xiàn)1845條經(jīng)驗(yàn) 獲得超8個(gè)贊

我的也是這種錯(cuò)誤,你的解決了嗎?我用的thrift0.9和0。11都是這樣的,我go1.9

查看完整回答
反對(duì) 回復(fù) 2019-03-18
  • 4 回答
  • 0 關(guān)注
  • 3946 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)