Skip to content

Commit

Permalink
simplify UnmarshalText
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkRosemaker committed May 29, 2022
1 parent 842ad4e commit 601d8ec
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions version.go
Expand Up @@ -443,12 +443,9 @@ func (v *Version) UnmarshalText(text []byte) error {
if err != nil {
return err
}
v.major = temp.major
v.minor = temp.minor
v.patch = temp.patch
v.pre = temp.pre
v.metadata = temp.metadata
v.original = temp.original

*v = *temp

return nil
}

Expand Down

0 comments on commit 601d8ec

Please sign in to comment.