mirror of https://gitee.com/openkylin/genmai.git
修改fastscan
This commit is contained in:
parent
e8a4c34e77
commit
f63825aac1
|
@ -15,7 +15,7 @@ import (
|
|||
var (
|
||||
dbhostsip = "172.17.20.121:3306"
|
||||
dbusername = "root"
|
||||
dbpassword = "Kylin123-"
|
||||
dbpassword = ""
|
||||
dbname = "kylincve"
|
||||
)
|
||||
|
||||
|
@ -41,11 +41,11 @@ func StrTrimSpace(v1str,v2str string )(v1,v2 string ){
|
|||
func comparSlice(v1slice,v2slice []string )int{
|
||||
for index,_ :=range v1slice{
|
||||
if v1slice[index] > v2slice[index]{
|
||||
fmt.Println(1111,v1slice[index],v2slice[index])
|
||||
// fmt.Println(1111,v1slice[index],v2slice[index])
|
||||
return version1
|
||||
}
|
||||
if v1slice[index] < v2slice[index]{
|
||||
fmt.Println(v1slice[index],v2slice[index])
|
||||
// fmt.Println(v1slice[index],v2slice[index])
|
||||
return version2
|
||||
}
|
||||
if len(v1slice)-1 == index {
|
||||
|
@ -176,8 +176,8 @@ func PushCompareVersion(cve_no string,dpkgInfoStr string,ubuntu_v10_1_edition st
|
|||
}
|
||||
v2 := strings.ReplaceAll(ubuntu_v10_1_edition, "ubuntu", ".")
|
||||
v2 = strings.ReplaceAll(v2, "kylin", ".")
|
||||
v1="2.2.10-3.2"
|
||||
v2="2.2.8-1.1"
|
||||
// v1="2.2.10-3.2"
|
||||
// v2="2.2.8-1.1"
|
||||
result=compareStrVer(v1,v2)
|
||||
return result
|
||||
|
||||
|
|
Loading…
Reference in New Issue