feat(nocgo): enable to build with CGO_ENABLED=0 (#1080)

This commit is contained in:
Kota Kanbe
2020-11-27 09:55:09 +09:00
committed by GitHub
parent 1f610043cf
commit 5fea4eaef8
37 changed files with 83 additions and 31 deletions

View File

@@ -1,3 +1,5 @@
// +build !scanner
package gost
import (

View File

@@ -1,3 +1,5 @@
// +build !scanner
package gost
import (

View File

@@ -1,3 +1,5 @@
// +build !scanner
package gost
import (

View File

@@ -1,3 +1,5 @@
// +build !scanner
package gost
import (

View File

@@ -1,8 +1,8 @@
// +build !scanner
package gost
import (
"strings"
"github.com/future-architect/vuls/models"
"github.com/knqyf263/gost/db"
)
@@ -16,7 +16,3 @@ type Pseudo struct {
func (pse Pseudo) DetectUnfixed(driver db.DB, r *models.ScanResult, _ bool) (int, error) {
return 0, nil
}
func major(osVer string) (majorVersion string) {
return strings.Split(osVer, ".")[0]
}

View File

@@ -1,3 +1,5 @@
// +build !scanner
package gost
import (

View File

@@ -2,6 +2,7 @@ package gost
import (
"net/http"
"strings"
"time"
"github.com/cenkalti/backoff"
@@ -181,3 +182,7 @@ func httpGet(url string, req request, resChan chan<- response, errChan chan<- er
json: body,
}
}
func major(osVer string) (majorVersion string) {
return strings.Split(osVer, ".")[0]
}