0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-25 07:30:38 +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" version = "0.0.0"
} }
v, err := semver.NewVersion(version) 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 // BreakingChangeTag breaking change tag from commit metadata