Skip to content

Commit 2bfca21

Browse files
authored
Replace ss with elems
1 parent 9b92ff7 commit 2bfca21

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/codeql/codeql-language-guides/customizing-library-models-for-go.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ This pattern covers many of the cases where we need to summarize flow through a
156156
.. code-block:: go
157157
158158
func TaintFlow() {
159-
ss := []string{"Hello", "World"}
159+
elems := []string{"Hello", "World"}
160160
sep := " "
161-
t := strings.Join(ss, sep) // There is taint flow from ss and sep to t.
161+
t := strings.Join(elems, sep) // There is taint flow from ss and sep to t.
162162
...
163163
}
164164
@@ -176,7 +176,7 @@ We need to add tuples to the ``summaryModel``\(namespace, type, subtypes, name,
176176
177177
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
178178
Each tuple defines flow from one argument to the return value.
179-
The first row defines flow from the first argument (``ss`` in the example) to the return value (``t`` in the example) and the second row defines flow from the second argument (``sep`` in the example) to the return value (``t`` in the example).
179+
The first row defines flow from the first argument (``elems`` in the example) to the return value (``t`` in the example) and the second row defines flow from the second argument (``sep`` in the example) to the return value (``t`` in the example).
180180

181181
The first five values identify the callable (in this case a method) to be modeled as a summary.
182182
These are the same for both of the rows above as we are adding two summaries for the same method.
@@ -190,7 +190,7 @@ These are the same for both of the rows above as we are adding two summaries for
190190
The sixth value should be left empty and is out of scope for this documentation.
191191
The remaining values are used to define the ``access path``, the ``kind``, and the ``provenance`` (origin) of the summary.
192192

193-
- The seventh value is the access path to the input (where data flows from). ``Argument[0]`` is the access path to the first argument (``ss`` in the example) and ``Argument[1]`` is the access path to the second argument (``sep`` in the example).
193+
- The seventh value is the access path to the input (where data flows from). ``Argument[0]`` is the access path to the first argument (``elems`` in the example) and ``Argument[1]`` is the access path to the second argument (``sep`` in the example).
194194
- The eighth value ``ReturnValue`` is the access path to the output (where data flows to), in this case ``ReturnValue``, which means that the input flows to the return value.
195195
- The ninth value ``taint`` is the kind of the flow. ``taint`` means that taint is propagated through the call.
196196
- The tenth value ``manual`` is the provenance of the summary, which is used to identify the origin of the summary.

0 commit comments

Comments
 (0)