CodeQL library for Go
codeql/go-all 2.1.3-dev (changelog, source)
Search

Predicate readsAnElement

Holds if node reads an element from base, either via an element-read (base[y]) expression or via a range statement _, node := range base.

Import path

import semmle.go.dataflow.internal.DataFlowUtil
predicate readsAnElement(Node node, Node base)