Skip to content

Commit

Permalink
Fix lint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
guoshiuan committed Apr 15, 2024
1 parent 42922f5 commit 478751f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions dataplane/saiserver/attrmgr/attrmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,10 @@ func (mgr *AttrMgr) Interceptor(ctx context.Context, req any, info *grpc.UnarySe
resp, err := handler(ctx, req)
// Ignore nonGet unimplemented errors.
if err != nil {
if st, _ := status.FromError(err); st.Code() != codes.Unimplemented {
st, _ := status.FromError(err)
switch {
case st.Code() != codes.Unimplemented, strings.Contains(info.FullMethod, "Create"), strings.Contains(info.FullMethod, "Set"), strings.Contains(info.FullMethod, "Remove"):
return resp, err
} else {
switch {
case strings.Contains(info.FullMethod, "Create") || strings.Contains(info.FullMethod, "Set") || strings.Contains(info.FullMethod, "Remove"):
return resp, err
}
}
}
reqMsg := req.(proto.Message)
Expand Down
2 changes: 1 addition & 1 deletion dataplane/saiserver/hostif.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ func (hostif *hostif) SetHostifAttribute(ctx context.Context, req *saipb.SetHost
}

// SetHostifTrapGroupAttribute sets the trap group attribute.
func (_ *hostif) SetHostifTrapGroupAttribute(context.Context, *saipb.SetHostifTrapGroupAttributeRequest) (*saipb.SetHostifTrapGroupAttributeResponse, error) {
func (*hostif) SetHostifTrapGroupAttribute(context.Context, *saipb.SetHostifTrapGroupAttributeRequest) (*saipb.SetHostifTrapGroupAttributeResponse, error) {
// TODO: provide implementation.
return &saipb.SetHostifTrapGroupAttributeResponse{}, nil
}
Expand Down

0 comments on commit 478751f

Please sign in to comment.