0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-21 22:10:39 +00:00

fix: nil reference on ToVersion

This commit is contained in:
Beatriz Vieira 2019-11-17 14:03:50 -03:00
parent 35b7f74a2a
commit a32342cf47

View File

@ -18,7 +18,10 @@ func ToVersion(value string) (semver.Version, error) {
version = "0.0.0"
}
v, err := semver.NewVersion(version)
return *v, err
if err != nil {
return semver.Version{}, err
}
return *v, nil
}
// BreakingChangeTag breaking change tag from commit metadata