1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-27 22:28:20 +02:00

fix unsafe check

This commit is contained in:
s7v7nislands
2016-10-25 11:57:05 +08:00
parent a4fd848bfc
commit 92dda9cc3b
2 changed files with 7 additions and 1 deletions

View File

@@ -33,7 +33,13 @@ func TestUnsafe(t *testing.T) {
"unsafe"
)
type Fake struct{}
func (Fake) Good() {}
func main() {
unsafeM := Fake{}
unsafeM.Good()
intArray := [...]int{1, 2}
fmt.Printf("\nintArray: %v\n", intArray)
intPtr := &intArray[0]