Summary
Steps to reproduce the behavior
The following code is currently not recognized by Rule G601
package main
import (
"fmt"
)
type sampleStruct struct {
name string
}
func main() {
samples := []sampleStruct{
{name: "a"},
{name: "b"},
}
for _, sample := range samples {
fmt.Println(&sample.name)
}
}
gosec version
master
Go version (output of 'go version')
Operating system / Environment
Expected behavior
For the above code, G601 should prompt a warning
Actual behavior
For the above code, G601 does not have any warning