kitex icon indicating copy to clipboard operation
kitex copied to clipboard

[bthrift]method WriteByte(buf []byte, value int8) int should have signature WriteByte(byte) error

Open cherishman2005 opened this issue 1 year ago • 2 comments

Describe the bug

  • Makefile
GOVET        := $(GO) vet

vet-case:
        ${GOVET} ./...

  • make result
protocol/bthrift/binary.go:108:23: method WriteByte(buf []byte, value int8) int should have signature WriteByte(byte) error
protocol/bthrift/binary.go:413:23: method ReadByte(buf []byte) (value int8, length int, err error) should have signature ReadByte() (byte, error)
protocol/bthrift/interface.go:47:2: method WriteByte(buf []byte, value int8) int should have signature WriteByte(byte) error
protocol/bthrift/interface.go:92:2: method ReadByte(buf []byte) (value int8, length int, err error) should have signature ReadByte() (byte, error)
make: *** [Makefile:106: vet-case] Error 2

To Reproduce

vet-case:
        ${GOVET} ./...
  1. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Kitex version:

master branch

Environment:

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB="*"
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://goproxy.yy.com"
GOROOT="/usr/local/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build202129420=/tmp/go-build -gno-record-gcc-switches"

cherishman2005 avatar Oct 01 '23 14:10 cherishman2005