版本比较,增加ignore error

This commit is contained in:
白茶清欢 2023-12-27 18:20:49 +08:00
parent 6da972b112
commit 448b472c53

View File

@ -86,3 +86,13 @@ func (v *version) Compare(versionOne string, versionTwo string, strictMode bool)
wrapper.Int(define.VersionTwoMax), wrapper.Int(define.VersionTwoMax),
).ToInt().Value, nil ).ToInt().Value, nil
} }
// CompareIgnoreError 忽略error
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 18:20 2023/12/27
func (v *version) CompareIgnoreError(versionOne string, versionTwo string, strictMode bool) int {
res, _ := v.Compare(versionOne, versionTwo, strictMode)
return res
}