Must is a helper that wraps a call to a function returning (*Version, error) and panics if error is non-nil.
(v *Version, err error)
| 98 | // Must is a helper that wraps a call to a function returning (*Version, error) |
| 99 | // and panics if error is non-nil. |
| 100 | func Must(v *Version, err error) *Version { |
| 101 | if err != nil { |
| 102 | panic(err) |
| 103 | } |
| 104 | |
| 105 | return v |
| 106 | } |
| 107 | |
| 108 | // Compare compares this version to another version. This |
| 109 | // returns -1, 0, or 1 if this version is smaller, equal, |