1
0
mirror of https://github.com/mgechev/revive.git synced 2025-03-17 20:57:58 +02:00

Drop dependency on blang/semver

This commit is contained in:
mgechev 2020-02-20 15:07:54 -08:00
parent 709d007e9f
commit 82b0afca03

View File

@ -9,7 +9,6 @@ import (
"log"
"testing"
"github.com/blang/semver"
"k8s.io/klog"
)
@ -253,7 +252,7 @@ func (m *Migrator) MigrateIfNeeded(target *EtcdVersionPair) error { // MATCH /fu
for { // +1
klog.Infof("Converging current version '%s' to target version '%s'", current, target)
currentNextMinorVersion := &EtcdVersion{Version: semver.Version{Major: current.version.Major, Minor: current.version.Minor + 1}}
currentNextMinorVersion := &EtcdVersion{}
switch { // +1 +1
case current.version.MajorMinorEquals(target.version) || currentNextMinorVersion.MajorMinorEquals(target.version): // +1
klog.Infof("current version '%s' equals or is one minor version previous of target version '%s' - migration complete", current, target)