23 lines
542 B
Go
23 lines
542 B
Go
|
// Package tool ...
|
||
|
//
|
||
|
// Description : tool ...
|
||
|
//
|
||
|
// Author : go_developer@163.com<白茶清欢>
|
||
|
//
|
||
|
// Date : 2023-12-27 17:51
|
||
|
package tool
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func Test_version_Compare(t *testing.T) {
|
||
|
fmt.Println(Version.Compare("2.4.1", "2.4.1.0", true))
|
||
|
fmt.Println(Version.Compare("2.4.1", "2.4.1.0", false))
|
||
|
fmt.Println(Version.Compare("2.4.0", "2.4.1", true))
|
||
|
fmt.Println(Version.Compare("2.4.2", "2.4.1", true))
|
||
|
fmt.Println(Version.Compare("2.4", "2.4.1", true))
|
||
|
fmt.Println(Version.Compare("2.4.2", "2.4", true))
|
||
|
}
|