mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
doc: add note about import . to Go 1 compatibility notes
R=r CC=golang-dev https://golang.org/cl/5752065
This commit is contained in:
parent
502e29f485
commit
25f15d5f22
1 changed files with 9 additions and 0 deletions
|
@ -94,6 +94,15 @@ We therefore recommend that composite literals whose type is defined
|
|||
in a separate package should use the tagged notation.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Dot imports. If a program imports a standard package
|
||||
using <code>import . "path"</code>, additional names defined in the
|
||||
imported package in future releases may conflict with other names
|
||||
defined in the program. We do not recommend the use of <code>import .</code>
|
||||
outside of tests, and using it may cause a program to fail
|
||||
to compile in future releases.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
|
Loading…
Reference in a new issue