Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert(goleveldb): remove goleveldb flag #204

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ all: lint test
#? test: Run pure Go tests only
test:
@echo "--> Running go test"
@go test $(PACKAGES) -tags goleveldb,boltdb,badgerdb
@go test $(PACKAGES) -tags boltdb,badgerdb
.PHONY: test

#? test-goleveldb: Run goleveldb tests
test-goleveldb:
@echo "--> Running go test"
@go test $(PACKAGES) -tags goleveldb -v
.PHONY: test-goleveldb

#? test-cleveldb: Run cleveldb tests
test-cleveldb:
@echo "--> Running go test"
Expand Down Expand Up @@ -62,7 +56,7 @@ test-all-with-coverage:
-race \
-coverprofile=coverage.txt \
-covermode=atomic \
-tags=goleveldb,cleveldb,boltdb,rocksdb,badgerdb\
-tags=cleveldb,boltdb,rocksdb,badgerdb\
-v
.PHONY: test-all-with-coverage

Expand Down
10 changes: 0 additions & 10 deletions UPGRADING.md

This file was deleted.

1 change: 0 additions & 1 deletion db.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const (
// - UNMAINTANED
// - pure go
// - stable
// - use goleveldb build tag (go build -tags goleveldb)
GoLevelDBBackend BackendType = "goleveldb"
// CLevelDBBackend represents cleveldb (uses levigo wrapper)
// - DEPRECATED
Expand Down
3 changes: 0 additions & 3 deletions goleveldb.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
//go:build goleveldb
// +build goleveldb

package db

import (
"fmt"
"path/filepath"

"github.com/syndtr/goleveldb/leveldb"

Check failure on line 7 in goleveldb.go

View workflow job for this annotation

GitHub Actions / golangci

import 'github.com/syndtr/goleveldb/leveldb' is not allowed from list 'main' (depguard)
"github.com/syndtr/goleveldb/leveldb/errors"

Check failure on line 8 in goleveldb.go

View workflow job for this annotation

GitHub Actions / golangci

import 'github.com/syndtr/goleveldb/leveldb/errors' is not allowed from list 'main' (depguard)
"github.com/syndtr/goleveldb/leveldb/opt"

Check failure on line 9 in goleveldb.go

View workflow job for this annotation

GitHub Actions / golangci

import 'github.com/syndtr/goleveldb/leveldb/opt' is not allowed from list 'main' (depguard)
"github.com/syndtr/goleveldb/leveldb/util"

Check failure on line 10 in goleveldb.go

View workflow job for this annotation

GitHub Actions / golangci

import 'github.com/syndtr/goleveldb/leveldb/util' is not allowed from list 'main' (depguard)
)

func init() {
Expand Down Expand Up @@ -129,7 +126,7 @@

// Close implements DB.
func (db *GoLevelDB) Close() error {
if err := db.db.Close(); err != nil {

Check failure on line 129 in goleveldb.go

View workflow job for this annotation

GitHub Actions / golangci

if-return: redundant if ...; err != nil check, just return error instead. (revive)
return err
}
return nil
Expand Down Expand Up @@ -198,7 +195,7 @@
return newGoLevelDBIterator(itr, start, end, true), nil
}

// Compact range

Check failure on line 198 in goleveldb.go

View workflow job for this annotation

GitHub Actions / golangci

Comment should end in a period (godot)
func (db *GoLevelDB) Compact(start, end []byte) error {
return db.db.CompactRange(util.Range{Start: start, Limit: end})
}
3 changes: 0 additions & 3 deletions goleveldb_batch.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
//go:build goleveldb
// +build goleveldb

package db

import (
"github.com/syndtr/goleveldb/leveldb"

Check failure on line 4 in goleveldb_batch.go

View workflow job for this annotation

GitHub Actions / golangci

import 'github.com/syndtr/goleveldb/leveldb' is not allowed from list 'main' (depguard)
"github.com/syndtr/goleveldb/leveldb/opt"

Check failure on line 5 in goleveldb_batch.go

View workflow job for this annotation

GitHub Actions / golangci

import 'github.com/syndtr/goleveldb/leveldb/opt' is not allowed from list 'main' (depguard)
)

type goLevelDBBatch struct {
Expand Down
3 changes: 0 additions & 3 deletions goleveldb_iterator.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
//go:build goleveldb
// +build goleveldb

package db

import (
"bytes"

"github.com/syndtr/goleveldb/leveldb/iterator"

Check failure on line 6 in goleveldb_iterator.go

View workflow job for this annotation

GitHub Actions / golangci

import 'github.com/syndtr/goleveldb/leveldb/iterator' is not allowed from list 'main' (depguard)
)

type goLevelDBIterator struct {
Expand Down
3 changes: 0 additions & 3 deletions goleveldb_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build goleveldb
// +build goleveldb

package db

import (
Expand All @@ -9,7 +6,7 @@

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/syndtr/goleveldb/leveldb/opt"

Check failure on line 9 in goleveldb_test.go

View workflow job for this annotation

GitHub Actions / golangci

import 'github.com/syndtr/goleveldb/leveldb/opt' is not allowed from list 'test' (depguard)
)

func TestGoLevelDBNewGoLevelDB(t *testing.T) {
Expand Down
Loading