【发布时间】:2021-04-26 08:11:30
【问题描述】:
这里是文件ns.pb.go中函数的定义
CreateMACCommandQueueItem(ctx context.Context, in *CreateMACCommandQueueItemRequest, opts ...grpc.CallOption) (*empty.Empty, error)
这是我编写的 main.go 代码的一部分:
resp, err := serviceClient.CreateMACCommandQueueItem(context.Background(), &ns.CreateMACCommandQueueItemRequest{
DevEui: devEUI[:],
Cid: uint32(lorawan.LinkADRReq),
Commands: [][]byte{b},
})
if err != nil {
panic(err)
}
fmt.Printf("The MACCommand has been enqueued")
这是错误:
.\main.go:62:2: resp declared but not used
【问题讨论】: