1
0
mirror of https://github.com/securego/gosec.git synced 2025-07-03 00:27:05 +02:00

Replace gas with gosec everywhere in the project

This commit is contained in:
Cosmin Cojocar
2018-07-19 18:42:25 +02:00
parent da26f64208
commit 893b87b343
52 changed files with 387 additions and 390 deletions

View File

@ -1,20 +1,20 @@
package gas_test
package gosec_test
import (
"go/ast"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/securego/gas"
"github.com/securego/gas/testutils"
"github.com/securego/gosec"
"github.com/securego/gosec/testutils"
)
var _ = Describe("call list", func() {
var (
calls gas.CallList
calls gosec.CallList
)
BeforeEach(func() {
calls = gas.NewCallList()
calls = gosec.NewCallList()
})
It("should not return any matches when empty", func() {
@ -72,7 +72,7 @@ var _ = Describe("call list", func() {
matched := 0
v := testutils.NewMockVisitor()
v.Context = ctx
v.Callback = func(n ast.Node, ctx *gas.Context) bool {
v.Callback = func(n ast.Node, ctx *gosec.Context) bool {
if _, ok := n.(*ast.CallExpr); ok && calls.ContainsCallExpr(n, ctx) != nil {
matched++
}