Skip to content

Commit

Permalink
Use disable-ext-line, and prevent duplicate type in member name
Browse files Browse the repository at this point in the history
Signed-off-by: adeyemi <adeyemi.aladesawe@gmail.com>
  • Loading branch information
aladesawe committed Jan 23, 2025
1 parent 39f57f3 commit 8b9f622
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions server/storage/mvcc/kvstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type store struct {

// NewStore returns a new store. It is useful to create a store inside
// mvcc pkg. It should only be used for testing externally.
// revive:disable:unexported-return this is used internally in the mvcc pkg
// revive:disable-next-line:unexported-return this is used internally in the mvcc pkg
func NewStore(lg *zap.Logger, b backend.Backend, le lease.Lessor, cfg StoreConfig) *store {
if lg == nil {
lg = zap.NewNop()
Expand Down Expand Up @@ -133,8 +133,6 @@ func NewStore(lg *zap.Logger, b backend.Backend, le lease.Lessor, cfg StoreConfi
return s
}

// revive:enable:unexported-return

func (s *store) compactBarrier(ctx context.Context, ch chan struct{}) {
if ctx == nil || ctx.Err() != nil {
select {
Expand Down
2 changes: 1 addition & 1 deletion server/storage/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func localBinaryVersion() semver.Version {
return semver.Version{Major: v.Major, Minor: v.Minor}
}

type WALVersion = wal.WALVersion
type WALVersion = wal.Version

// Migrate updates storage schema to provided target version.
// Downgrading requires that provided WAL doesn't contain unsupported entries.
Expand Down
5 changes: 3 additions & 2 deletions server/storage/wal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ import (
"go.etcd.io/raft/v3/raftpb"
)

type WALVersion interface {
// Version defines the wal version interface.
type Version interface {
// MinimalEtcdVersion returns minimal etcd version able to interpret WAL log.
MinimalEtcdVersion() *semver.Version
}

// ReadWALVersion reads remaining entries from opened WAL and returns struct
// that implements schema.WAL interface.
func ReadWALVersion(w *WAL) (WALVersion, error) {
func ReadWALVersion(w *WAL) (Version, error) {
_, _, ents, err := w.ReadAll()
if err != nil {
return nil, err
Expand Down

0 comments on commit 8b9f622

Please sign in to comment.