Skip to content

Commit

Permalink
doc/go1.16: revamp vet check for asn1.Unamrshal section
Browse files Browse the repository at this point in the history
  • Loading branch information
KimMachineGun committed Feb 7, 2021
1 parent 070c0b6 commit e47c38f
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions doc/go1.16.html
Original file line number Diff line number Diff line change
Expand Up @@ -381,21 +381,11 @@ <h4 id="vet-frame-pointer">New warning for frame pointer</h4>
<h4 id="vet-asn1-unmarshal">New warning for asn1.Unmarshal</h4>

<p><!-- CL 243397 -->
The vet tool now warns about invalid calls of
The vet tool now warns about incorrectly passing a non-pointer or nil argument to
<a href="/pkg/encoding/asn1/#Unmarshal"><code>asn1.Unmarshal</code></a>.
If you pass non-pointer or nil argument to
<a href="/pkg/encoding/asn1/#Unmarshal"><code>asn1.Unmarshal</code></a>,
the vet tool will report it.
</p>

<p>
The vet tool already has been checking invalid <code>Unmarshal</code> and
<code>Decode</code> calls of other encoding packages such as
<a href="/pkg/encoding/json"><code>encoding/json</code></a>,
<a href="/pkg/encoding/xml"><code>encoding/xml</code></a>.
This release makes the vet tool check
<a href="/pkg/encoding/asn1"><code>encoding/asn1</code></a>'s one
as well.
This is like the existing checks for
<a href="/pkg/encoding/json/#Unmarshal"><code>encoding/json.Unmarshal</code></a>
and <a href="/pkg/encoding/xml/#Unmarshal"><code>encoding/xml.Unmarshal</code></a>.
</p>

<h2 id="runtime">Runtime</h2>
Expand Down

0 comments on commit e47c38f

Please sign in to comment.