Skip to content

Go: Model maps - #22709

Open
owen-mc wants to merge 1 commit into
github:mainfrom
owen-mc:go/model-maps-package
Open

owen-mc wants to merge 1 commit into
github:mainfrom
owen-mc:go/model-maps-package

Conversation

@owen-mc

@owen-mc owen-mc commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

This was missed when we did the Go 1.21 update. We can't model the functions involving iterators yet though.

@owen-mc
owen-mc requested a review from a team September 30, 2026 08:51
@owen-mc
owen-mc requested a review from a team as a code owner September 30, 2026 08:51
Copilot AI balanced review requested due to automatic review settings September 30, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The models match the APIs’ shallow-copy semantics and include appropriate coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Adds Go value-flow models for the standard-library maps package.

Changes:

  • Models key/value propagation through maps.Clone and maps.Copy.
  • Adds taint-flow coverage and a change note.
File Description
Maps.go Tests key and value propagation.
2026-09-30-model-maps-package.md Documents the analysis improvement.
maps.model.yml Defines Clone and Copy summaries.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

go

Generated file changes for go

  • Changes to framework-coverage-go.rst:
-    `Standard library <https://pkg.go.dev/std>`_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,674,127
+    `Standard library <https://pkg.go.dev/std>`_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,678,127
-    Totals,,690,1134,1580
+    Totals,,690,1138,1580
  • Changes to framework-coverage-go.csv:
+ maps,,,4,,,,,,,,,,,,,,,,,,,,,,,,4

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants