diff --git a/tool/version.go b/tool/version.go index 01a78e1..9120ed2 100644 --- a/tool/version.go +++ b/tool/version.go @@ -86,3 +86,13 @@ func (v *version) Compare(versionOne string, versionTwo string, strictMode bool) wrapper.Int(define.VersionTwoMax), ).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 +}