Skip to content

Commit 2930e79

Browse files
committed
Fix mistakes in Go data flow examples in docs
1 parent 87f32dc commit 2930e79

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/codeql/codeql-language-guides/analyzing-data-flow-in-go.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ The resulting module has an identical signature to the one obtained from ``DataF
224224
Flow sources
225225
~~~~~~~~~~~~
226226

227-
The data flow library contains some predefined flow sources. The class ``RemoteFlowSource`` (defined in ``semmle.code.java.dataflow.FlowSources``) represents data flow sources that may be controlled by a remote user, which is useful for finding security problems.
227+
The data flow library contains some predefined flow sources. The class ``RemoteFlowSource`` represents data flow sources that may be controlled by a remote user, which is useful for finding security problems.
228228

229229
Examples
230230
~~~~~~~~
@@ -312,7 +312,7 @@ Exercise 3
312312
313313
import go
314314
315-
class GetenvSource extends CallExpr {
315+
class GetenvSource extends DataFlow::CallNode {
316316
GetenvSource() {
317317
exists(Function m | m = this.getTarget() |
318318
m.hasQualifiedName("os", "Getenv")
@@ -327,7 +327,7 @@ Exercise 4
327327
328328
import go
329329
330-
class GetenvSource extends CallExpr {
330+
class GetenvSource extends DataFlow::CallNode {
331331
GetenvSource() {
332332
exists(Function m | m = this.getTarget() |
333333
m.hasQualifiedName("os", "Getenv")
@@ -350,7 +350,6 @@ Exercise 4
350350
sink.asExpr() = call.getArgument(0)
351351
)
352352
}
353-
}
354353
}
355354
356355
module GetenvToURLFlow = DataFlow::Global<GetenvToURLConfig>;

0 commit comments

Comments
 (0)