Showing 3 of 5 total issues
Method ldService.DeleteRange
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (l ldService) DeleteRange(keyRange *pb.KeyRange, server pb.Ld_DeleteRangeServer) error {
matcher, err := NewMatcher(keyRange.Pattern)
if err != nil {
log.Debugf("Could not compile matcher from patter, %v: %v", keyRange.Pattern, err)
return err
Method ldService.DeleteRange
has 5 return statements (exceeds 4 allowed). Open
Open
func (l ldService) DeleteRange(keyRange *pb.KeyRange, server pb.Ld_DeleteRangeServer) error {
matcher, err := NewMatcher(keyRange.Pattern)
if err != nil {
log.Debugf("Could not compile matcher from patter, %v: %v", keyRange.Pattern, err)
return err
Method ldService.Delete
has 5 return statements (exceeds 4 allowed). Open
Open
func (l ldService) Delete(_ context.Context, key *pb.Key) (*pb.KeyValue, error) {
var value []byte
err := l.DB.Update(func(txn *badger.Txn) (err error) {
value, err = readSingleFromKey(txn, key)
if err != nil {