mirror of
https://github.com/golang/go
synced 2024-11-23 05:20:11 -07:00
doc/go1.16: revamp vet check for asn1.Unamrshal section
This commit is contained in:
parent
070c0b6b45
commit
e47c38f630
@ -381,21 +381,11 @@ func TestFoo(t *testing.T) {
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user