Skip to content

Commit

Permalink
fix: import lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Marina-Sakai committed May 30, 2024
1 parent 9f98d5d commit 6fbf869
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/generic/generic_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ type Service interface {
}

// ServiceInfo create a generic ServiceInfo
// TODO: if cannot change, can add a new interface
func ServiceInfo(pcType serviceinfo.PayloadCodec, codec serviceinfo.CodecInfo) *serviceinfo.ServiceInfo {
return newServiceInfo(pcType, codec)
}
Expand Down Expand Up @@ -131,8 +130,8 @@ func (g *Args) Write(ctx context.Context, out thrift.TProtocol) error {
if err, ok := g.inner.(error); ok {
return err
}
if rw, ok := g.inner.(gthrift.MessageWriter); ok {
return rw.Write(ctx, out, g.Request, g.base)
if w, ok := g.inner.(gthrift.MessageWriter); ok {
return w.Write(ctx, out, g.Request, g.base)
}
return fmt.Errorf("unexpected Args writer type: %T", g.inner)
}
Expand All @@ -141,8 +140,8 @@ func (g *Args) WritePb(ctx context.Context) (interface{}, error) {
if err, ok := g.inner.(error); ok {
return nil, err
}
if rw, ok := g.inner.(gproto.MessageWriter); ok {
return rw.Write(ctx, g.Request)
if w, ok := g.inner.(gproto.MessageWriter); ok {
return w.Write(ctx, g.Request)
}
return nil, fmt.Errorf("unexpected Args writer type: %T", g.inner)
}
Expand Down
1 change: 1 addition & 0 deletions pkg/generic/thrift/thrift.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"context"

"github.com/apache/thrift/lib/go/thrift"

"github.com/cloudwego/kitex/pkg/remote"
)

Expand Down

0 comments on commit 6fbf869

Please sign in to comment.